How much of the modern NaN (ie the IEEE standard one) was innovation by the standard committee? I would expect at least the spelling "NaN" and the distinction
| This article is rated C-class on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | |||||||||||||||||||||
| |||||||||||||||||||||
How much of the modern NaN (ie the IEEE standard one) was innovation by the standard committee? I would expect at least the spelling "NaN" and the distinction between singalling and quiet NaN to be from the IEEE standard...
Is NaN an acronym or an initialism? jnestorius(talk) 20:52, 21 September 2006 (UTC)
I've had a lot of cross-platform experience with NaNs back in the 1990's. As the current article suggests, all the big h/w vendors fell into one of the two possible camps regarding the representation of signalling and quiet NaNs (basically a difference in interpretation of one bit). This affected data portability but worse still was the situation with private NaN values. The product I worked on then used several private encodings to represent special numeric cases, e.g. uninitialised, error, not-available, etc. Some were quiet and some were signalling. All architectures should have one special quiet NaN representing arithmetic calculations with no valid (real) answer, e.g. 0/0, sqrt(-1), log(0), etc., when trapping is suppressed. In the Intel architecture, this is called 'Indefinite'. A better description is the 'Canonical NaN' -- I cannot give a reference for this term but I believe I first saw it in some old DEC internal documentation. Unfortunately, different vendors used different encodings for this special value and so trying to make your own private encodings distinct from it was like trying to hit a moving target. Even more unfortunate was the fact that some vendors used a different value in their h/w to in their mathematics library, and at least one vendor used a different encoding in different versions of their h/w chipset.
Another issue was the way in which NaNs (and Infinities) were generated on some machines. Rather than being generated by h/w, or even f/w, some generated a microtrap that then dispatched to a piece of s/w to determine the correct value to return from the floating-point instruction. This could result in a calculation that generated a special value taking 50-100 times longer than one that generated a normal value. This affected several database products of that era, and especially OLAP products, since it was more efficient to just ignore IEEE special values altogether and select some arbitrary 'large real values' to represent the special cases instead (e.g. 1E38). --TonyP (talk) 19:58, 8 April 2009 (UTC)
Pless admision my seet no E027086 maths no 20 plees 35
Satyaprakash rajbhar (talk) 11:33, 24 June 2017 (UTC)
In some cases, NaN is used where numbers may be results. For example, zero divided by zero is ambiguous -- any number multiplied by zero is zero, so zero divided by zero may be any number. In this context, "Not a Number" is an inaccurate description of the result. A more accurate description of this case would be "Not Any Specific Number" or, more simply "Any Number". —Preceding unsigned comment added by 159.54.131.7 (talk) 17:08, 9 September 2009 (UTC)
Mere coincidence that Patrick Mc in The Prisoner: "I am not a number" —Preceding unsigned comment added by 82.19.170.119 (talk) 17:27, 3 October 2009 (UTC)
I'm looking for the unicode symbol if any that is NaN in a single codepoint. Help? 168.251.194.25 (talk) 19:50, 16 December 2009 (UTC)
The article says that "For example, 1/0 is undefined as a real number, and so represented by NaN". However, at least in Java, 1/0.0=POSITIVE_INFINITY, not NaN (and 1/-0.0=NEGATIVE_INFINITY, but 0/0.0 is NaN). —Preceding unsigned comment added by 81.20.159.197 (talk) 14:11, 29 January 2010 (UTC)
is listed in Indeterminate form#List of indeterminate forms. Why is it not listed in the list of operations that return an NaN, while is listed? --71.141.115.178 (talk) 20:26, 18 June 2010 (UTC)
Uh... tan(pi/2) is not complex. Should this bullet point be moved into the second of the three categories (in the Creation section)?
According to IEEE-754 References, there is a special value *Indeterminate*. It's hard to find any useful information on it. From what little I can tell, it might be a subset of NaN, used specifically for "indeterminate forms". It would be good to properly explain that special value, and how it is the same/differs from NaN. Cmcqueen1975 (talk) 03:18, 12 October 2010 (UTC)
Worth remembering:
1. Trigonometric functions tan (2x+1)π/2, csc (2x+1)π/2, cot 2πx, and sec 2πx in which x is an integer imply division by zero and thus give only infinite results.
2. Some trigonometric functions have limited ranges for their values:
-1 ≤ sin x ≤ 1 -1 ≤ cos x ≤ 1 |sec x| ≥ 1 |csc x| ≥ 1
Inverse trigonometric functions that have x inappropriate for those ranges, including arcsin x > 1, arccos x > 1, -1 < arcsec x < 1, and -1 < arccsc x < 1 can have no values.
Calculators obviously give non-numbers for prohibited values for those functions. Pbrower2a (talk) 14:22, 1 February 2013 (UTC)
Would it be relevant to include a list of languages that use NaNs? This section could also include the representation used, which could give more context to the Display section. Paul2520 (talk) 15:43, 7 November 2013 (UTC)
and in practice are raised as hardware-level exceptions by the CPU.[1] Seems to me that most hardware generates an exception for fixed point divide by zero, but the exception for fixed point overflow is rare. Converting floating point to integer for out of range values might be considered fixed point overflow. Unless all hardware generates an exception, the statement is wrong. Gah4 (talk) 20:56, 2 October 2015 (UTC)
On the topic of signaling NaN, article says "There have been several ideas for how these might be used:" ... "In practice this approach is faced with many complications". As far as I can tell, nobody has ever successfully used signaling NaNs for anything (and most environments disable them by default). If this is true, perhaps the article should say more a little clearly that almost nobody ever uses or encounters signaling NaNs? Or, if it's false, the article could mention an example of a product/project/technology which uses them. 50.197.188.73 (talk) 06:05, 1 December 2015 (UTC)
I would like to recommend that the main contributors to this page add a section on the use of user-defined NaN values. There are clear application requirements that would benefit from the apparent freedom offered by IEEE for user-defined NaN states, but there are serious practical difficulties involved (see my earlier entry on this Talk page). Having a section that makes people aware of those difficulties, any best practices, and potential revisions to the standard, would be a useful resource for application designers.TonyP (talk) 11:19, 17 November 2018 (UTC)
In the Function definition section one sentence reads:
"The rationale for returning the value 1 for the indeterminate forms was that the value of functions at singular points can be taken as a particular value if that value is in the limit the value for all but a vanishingly small part of a ball around the limit value of the parameters."
Seems unclear to me, two comments: "if that value is in the limit the value" should that say "if that value is in the limit of the value"? Also what does "part of a ball around the limit value" mean please? John a s (talk) 16:51, 27 December 2021 (UTC)
I think the case NaN = NaN resulting in false should be mentioned at least. 132.199.174.208 (talk) 13:07, 10 January 2022 (UTC)
DO 11 I=l,10
DO 12 J=l,10
IF (B(I).LT.0.)GO TO 11
12 C(J)=SQRT(B(I))
11 CONTINUE
where the compiler moves the SQRT, but not the test, outside the loop. Gah4 (talk) 23:57, 10 January 2022 (UTC)
I heard this anecdote about a C (or similar) compiler. The programmer had written the macro #define ISNAN(x) ((x) != (x)), but it seemed to be "randomly" working or failing. Turns out, the compiler had seen that, and decided that all numbers had to be equal to themselves, and so "optimised" the macro, essentially replacing it with false, causing it to fail. However, if the macro was used in a compound statement, then it was too complex for the compiler to successfully evaluate, and so in those cases, the macro was left alone, and so would work in those situations. Bradley.sigma (talk) 10:25, 27 April 2025 (UTC)
A recent edit summary mentions N/A. As well as I know, some statistics software uses NaN for what in statistics is N/A. For example, missing data in an input data set, as it was never measured. That should be different from NaN, and maybe other bits are used to distinguish them. Gah4 (talk) 07:08, 18 March 2024 (UTC)
A portion of the Canonical NaN subsection seems ambiguous to me. "ECMAScript (JavaScript) treats all NaN as if they are the same value" is accurate, in the sense that each IEEE value that could represent a NaN, each NaN is treated the same in the context of code execution per the 2026 Language Specification: 6.1.6.1 The Number Type: "to ECMAScript code, all NaN values are indistinguishable from each other." It also cites a secondary source (a github issue for WASM, #21), instead of a primary (link above).
Also, in it's use in code, binary operators of ==, !=, ===, and !== adhere to the IEEE specification as listed in the "Comparison with NaN" subsection (NaN === NaN is false), but [6.1.6.1.14 Number::sameValue(x,y)] will return true, if both X and Y are NaNs. I'm not sure whether we should refactor this out another section of "Programming Language Implementations," as if I were to include just ECMAScript as a subsection, it could give undue preference to a single language, and I am not familiar enough with other languages to populate subsections for them. SemperRabbit SRO (talk) 21:59, 14 May 2025 (UTC)
Rikivillalba added information about NA in the R language and its representation, but though this was officially documented in the past, I could not find anything in the current documentation (e.g. R language definition and R internals version 4.5.1 (2025-06-13)), even with the help of AI:
Either a current official source should be given or this should be rephrased. — Vincent Lefèvre (talk) 10:15, 1 October 2025 (UTC)
The redirect unordered has been listed at redirects for discussion to determine whether its use and function meets the redirect guidelines. Readers of this page are welcome to comment on this redirect at Wikipedia:Redirects for discussion/Log/2025 November 9 § unordered until a consensus is reached. Thepharoah17 (talk) 21:21, 9 November 2025 (UTC)
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.