PlanetMath (more info)
 Math for the people, by the people.
Encyclopedia | Requests | Forums | Docs | Wiki | Random | RSS  
Login
create new user
name:
pass:
forget your password?
Main Menu
Owner confidence rating: High Entry average rating: No information on entry rating
not a number (Definition)

In a computer, not a number (usually abbreviated NaN) indicates that an arithmetical operation has resulted in a value that is not a number understood (or representable) by the computer. Division by zero is one frequent cause of a result being NaN. Asking for the square root of a negative number is another operation that can result in NaN (unless the computer has been programmed to recognize imaginary numbers).

NaN is not a specific value that can be tested for with the usual comparison operators. The programmer is advised to test for NaN with a special function provided by the programming language (such as isNaN(x) in JavaScript.

Generally, computer algebra systems do not report NaN results even if they do display an error message for a given operation.

Bibliography

1
David Flanagan, JavaScript the Definitive Guide: The Definitive Guide. New York: O'Reilly (2006): 24



"not a number" is owned by PrimeFan.
(view preamble | get metadata)

View style:

Log in to rate this entry.
(view current ratings)

Cross-references: even, computer algebra systems, JavaScript, language, function, operators, imaginary numbers, negative number, square root, division by zero, representable, operation, arithmetical
There are 2 references to this entry.

This is version 1 of not a number, born on 2008-07-18.
Object id is 10824, canonical name is NotANumber.
Accessed 293 times total.

Classification:
AMS MSC68P01 (Computer science :: Theory of data :: General)

Pending Errata and Addenda
None.
Discussion
Style: Expand: Order:
forum policy

No messages.

Interact
post | correct | update request | add derivation | add example | add (any)