Post Reply 
NaN
12-14-2014, 11:07 PM
Post: #1
NaN
I notice that I seen the letters "NaN" in some of my results from a calculation? What is it?
Find all posts by this user
Quote this message in a reply
12-14-2014, 11:19 PM
Post: #2
RE: NaN
Not a Number.
Find all posts by this user
Quote this message in a reply
12-15-2014, 10:04 AM
Post: #3
RE: NaN
Hello,

(12-14-2014 11:07 PM)mpowell@rogershsa.com Wrote:  I notice that I seen the letters "NaN" in some of my results from a calculation? What is it?


NaN means Not a Number. This is in fact a 'special' number that is the result of some low lever operations such as 0/0 or 0^0...

As a general rule, any function that has an input of NaN will return a NaN.
This allows sloppy programmer to perform a sequence of floating points operations without having to check the result of each operation for errors as, once one function returns a NaN, all subsequent calculations will return NaN...

As a general rules, when a low level functions create such things, it should be caught and a proper error should be returned to the user (throughout the rule does not always apply)...

Could you tell us how you generated this NaN so that we can see if this is normal or Not?

Cyrille
Find all posts by this user
Quote this message in a reply
12-16-2014, 09:04 AM
Post: #4
RE: NaN
(12-15-2014 10:04 AM)cyrille de brĂ©bisson Wrote:  sloppy programmer

William Kahan might like to have a word with you.

Cheers
Thomas
Find all posts by this user
Quote this message in a reply
Post Reply 




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