Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
NaN
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Value for unrepresentable data}} {{Other uses|Nan (disambiguation)}} In [[computing]], '''NaN''' ({{IPAc-en|n|Γ¦|n}}), standing for '''Not a Number''', is a particular [[value (computer science)|value]] of a numeric [[data type]] (often a [[floating-point arithmetic|floating-point number]]) which is undefined as a number, such as the result of [[0/0]]. Systematic use of NaNs was introduced by the [[IEEE 754]] floating-point standard in 1985, along with the representation of other non-finite quantities such as [[Infinity|infinities]]. In [[mathematics]], the result of {{sfrac|0|0}} is typically not defined as a number{{efn|0/0 is undefined as a number in both the [[real number]] and [[extended real number]] systems, while 1/Β±0, for example, could be consistently assigned a value of Β±β in the latter system, assuming a [[signed zero]].}} and may therefore be represented by NaN in computing systems.<!-- Warning: computing systems include integer types, where one may compute 0/0 and NaN usually doesn't exist. Possibly clarify or expand the section on integers (which currently only considers the conversion of a floating-point NaN to an integer type, which is not the same thing as doing 0/0 in integer arithmetic). --> The [[square root]] of a [[negative number]] is not a [[real number]], and is therefore also represented by NaN in compliant computing systems. NaNs may also be used to represent missing values in computations.<ref name=idl>{{cite book|last=Bowman|first=Kenneth|date=2006|title=An Introduction to Programming with IDL: Interactive Data Language|url=https://archive.org/details/introductiontopr00bowm|url-access=limited|publisher=Academic Press|page=[https://archive.org/details/introductiontopr00bowm/page/n26 26]|isbn=978-0-12-088559-6}}</ref><ref>{{cite book|last1=Press|first1=William H.|last2=Teukolsky|first2=Saul A.|last3=Vetterling|first3=William T.|last4=Flannery|first4=Brian P.|date=2007|title=Numerical Recipes: The Art of Scientific Computing|url=https://archive.org/details/numericalrecipes00pres_033|url-access=limited|publisher=Cambridge University Press|page=[https://archive.org/details/numericalrecipes00pres_033/page/n57 34]|isbn=978-0-521-88068-8}}</ref> Two separate kinds of NaNs are provided, termed ''quiet NaNs'' and ''signaling NaNs''. Quiet NaNs are used to propagate errors resulting from invalid operations or values. Signaling NaNs can support advanced features such as mixing numerical and [[computer algebra|symbolic computation]] or other extensions to basic floating-point arithmetic.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)