What is Nan and what does it do?
NaN, an acronym for Not a Number is an exception that usually occurs in the cases when an expression results in a number that is undefined or can’t be represented.It is used for floating-point operations. For example:
What is Nan short for?
Nan
- Gender: Female
- Origin: English
- Meaning: Grace
What does it mean by Nan?
NaN is a property of the global object. In other words, it is a variable in global scope. The initial value of NaN is Not-A-Number — the same as the value of Number.NaN. In modern browsers, NaN is a non-configurable, non-writable property. Even when this is not the case, avoid overriding it.
What does Nan mean in code?
- GCC and LLVM provides built-in implementations of nan () and nans (). ...
- The GNU C Library 's float-parser uses the char-sequence string in "some unspecified fashion". ...
- Newlib does not implement nan () parsing, but strtod () accepts a hexadecimal format without prefix.
- musl does not implement any payload parsing.
What does NaN mean in chat?
It means "not one" or "not any" or "none."
What does NaN mean in business?
NAN. National Attorney Network. showing only Business & Finance definitions (show all 20 definitions)
What does NaN mean social media?
Not A Number. showing only Slang/Internet Slang definitions (show all 20 definitions)
What does NaN stand for in Canada?
Nishnawbe Aski Nation (NAN) was established in 1973, and was originally known as Grand Council Treaty No.
What does NaN mean in computer?
Not A Number(2) (NaN) (Not A Number) An undefined value, mostly occurring when a non-floating point number is computed by a floating point operation.
What does NaN mean in stock market?
An "N/A," which stands for not applicable or not available, will sometimes be reported as a stock's P/E ratio.
What does NaN stand for on Facebook?
Sometimes Facebook doesn't register the mileage that folks put into their listing properly and writes "NaN" (not a number). So they either have to edit the listing or adjust how they entered the values.
What does NaN mean on Linkedin?
Not a Number (NaN)
What does NaN mean in games?
Not a NumberIt stands for "Not a Number", implying that your high scores are invalid numbers.
What is NaN short for in Scotland?
Father, Grandfather, Grandmother etc. In Scotland we refer to our Grandmother as Granny or Gran....but I notice that English people use "Nan".
What does NaN mean in statistics?
NaN (Not a Number) is a numeric data type that means an undefined value or value that cannot be represented, especially results of floating-point calculations.
Acronyms & Abbreviations
Get instant explanation for any acronym or abbreviation that hits you anywhere on the web!
A Member Of The STANDS4 Network
Get instant explanation for any acronym or abbreviation that hits you anywhere on the web!
What does nan mean in math?
In computing, NaN ( / næn / ), standing for Not a Number, is a member of a numeric data type that can be interpreted as a value that is undefined or unrepresentable, especially in floating-point arithmetic.
When was the NaN introduced?
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 infinities . In mathematics, zero divided by zero is undefined as a real number, and is therefore represented by NaN in computing systems. The square root of a negative number is not ...
What is a signaling NAN?
Signaling NaNs, or sNaNs, are special forms of a NaN that, when consumed by most operations, should raise the invalid operation exception and then, if appropriate, be "quieted" into a qNaN that may then propagate. They were introduced in IEEE 754. There have been several ideas for how these might be used:
What is the predicate for a NaN operand?
The other standard comparison predicates are all signaling if they receive a NaN operand. The standard also provides non-signaling versions of these other predicates. The predicate isNaN ( x) determines if a value is a NaN and never signals an exception, even if x is a signaling NaN.
What is the predicate for comparing with a NaN?
A comparison with a NaN always returns an unordered result even when comparing with itself. The comparison predicates are either signaling or non-signaling on quiet NaN operands; the signaling versions signal the invalid operation exception for such comparisons. The equality and inequality predicates are non-signaling so x = x returning false can be used to test if x is a quiet NaN. The other standard comparison predicates are all signaling if they receive a NaN operand. The standard also provides non-signaling versions of these other predicates. The predicate isNaN ( x) determines if a value is a NaN and never signals an exception, even if x is a signaling NaN.
What is a quiet NAN?
Quiet NaN. Quiet NaNs, or qNaNs, do not raise any additional exceptions as they propagate through most operations. The exceptions are where the NaN cannot simply be passed through unchanged to the output, such as in format conversions or certain comparison operations.
Is NaN the same as infinity?
In floating-point calculations, NaN is not the same as infinity, although both are typically handled as special cases in floating-point representations of real numbers as well as in floating-point operations.
Overview
In computing, NaN , standing for Not a Number, is a member of a numeric data type that can be interpreted as a value that is undefined or unrepresentable, especially in floating-point arithmetic. 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 infinities.
In mathematics, zero divided by zero is undefined and is therefore represented by NaN in computi…
Floating point
In floating-point calculations, NaN is not the same as infinity, although both are typically handled as special cases in floating-point representations of real numbers as well as in floating-point operations. An invalid operation is also not the same as an arithmetic overflow (which might return an infinity) or an arithmetic underflow (which would return the smallest normal number, a subnormal number, or zero).
Function definition
There are differences of opinion about the proper definition for the result of a numeric function that receives a quiet NaN as input. One view is that the NaN should propagate to the output of the function in all cases to propagate the indication of an error. Another view, and the one taken by the ISO C99 and IEEE 754-2008 standards in general, is that if the function has multiple arguments and the output is uniquely determined by all the non-NaN inputs (including infinity), then that val…
Integer NaN
Most fixed-size integer formats cannot explicitly indicate invalid data. In such a case, when converting NaN to an integer type, the IEEE 754 standard requires that an invalid operation exception be signaled. For example in Java, such operations throw instances of java.lang.ArithmeticException. In C, they lead to undefined behavior, but if annex F is supported, the operation yields an "invalid" floating-point exception (as required by the IEEE standard) and a…
Display
Different operating systems and programming languages may have different string representations of NaN.
Since, in practice, encoded NaNs have a sign, a quiet/signaling bit and optional 'diagnostic information' (sometimes called a payload), these will occasionally be found in string representations of NaNs, too. Some examples are:
Encoding
In IEEE 754 standard-conforming floating-point storage formats, NaNs are identified by specific, pre-defined bit patterns unique to NaNs. The sign bit does not matter. Binary format NaNs are represented with the exponential field filled with ones (like infinity values), and some non-zero number in the significand field (to make them distinct from infinity values). The original IEEE 754 standard from 1985 (IEEE 754-1985) only described binary floating-point formats, and did not sp…
External links
• Not a Number, foldoc.org
• IEEE 754-2008 Standard for Floating-Point Arithmetic (subscription required)
• IEEE 754-2019 Standard for Floating-Point Arithmetic (subscription required)