Post Reply 
Not a Number NaN
10-04-2015, 05:38 PM
Post: #1
Not a Number NaN
Hi all,

Is it posible to give back in a subroutine the expression (value?) NaN

Cheers,

Jan
Find all posts by this user
Quote this message in a reply
10-05-2015, 07:02 AM
Post: #2
RE: Not a Number NaN
Hello,

In PPL, in theory, no.

The only way to generate a NaN on Prime is through the CAS. So you could generate a NaN using the CAS, store that in a variable (CAS or home) and then return that variable from your function.
Be careful of the difference between undef and NaN... undef IS NaN in CAS, but if moved to home, it becomes just a 'variable name'. Which means that it will NOT behave in the same way if you start doing calculations with it.

You want to make sure that, even in home, NaN+1=NaN (for example).

They might be some other way to do it, but this is the first one the jumps to mind.

Cyrille

Although I work for the HP calculator group, the views and opinions I post here are my own. I do not speak for HP.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)