Talk:NaN

From Wikipedia, the free encyclopedia
Jump to: navigation, search
WikiProject Computing  
WikiProject icon This article is within the scope of WikiProject Computing, a collaborative effort to improve the coverage of computers, computing, and information technology on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
 ???  This article has not yet received a rating on the project's quality scale.
 ???  This article has not yet received a rating on the project's importance scale.
 

IEEE[edit]

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...

Pronunciation[edit]

Is NaN an acronym or an initialism? jnestorius(talk) 20:52, 21 September 2006 (UTC)

  • Yes. Uncle G 12:10, 14 December 2006 (UTC)
  • Dunno, but she sure is getting old.
  • NaN = Not a Number. Anthony Appleyard (talk) 15:04, 2 August 2009 (UTC)

Nullity/Transreal numbers[edit]

Since AfD went through on the Transreal number article to redirect to here, should we add a mention of it? Someone looking up transreal numbers and just getting this article would be confused, since there's no way they know how they relate. fintler 23:06, 14 December 2006 (UTC)

Number vs Numeral[edit]

In the paragraph dealing with the NaN Toolbox, the word numeral is used several times. Should this read number instead? 67.168.55.79 16:31, 19 April 2007 (UTC)

Canonical NaNs[edit]

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)

Zero divided by Zero[edit]

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)


Bubbles on beach[edit]

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)

In the original script, he was going to say "I am an arithmetic overflow," but the director liked "not a number" better. Jmdeur (talk) 18:02, 9 November 2009 (UTC)

Unicode symbol?[edit]

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)

1/0 is NaN?[edit]

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)

Yes that's very silly, I've gone and replaced it with 0/0. Dmcq (talk) 17:28, 29 January 2010 (UTC)

∞^0 omitted?[edit]

\infty ^ 0 is listed in Indeterminate form#List of indeterminate forms. Why is it not listed in the list of operations that return an NaN, while 1 ^ \infty is listed? --71.141.115.178 (talk) 20:26, 18 June 2010 (UTC)

I better check the article through for the power function. In fact IEEE 754-2008 has 3 different power operations. The usual one is pow() which tries returning a value rather than a NaN, pow(1,∞) is 1 but powr(1,∞) is an invalid operation and so return NaN. Dmcq (talk) 22:47, 18 June 2010 (UTC)

Tan(pi/2)[edit]

Uh... tan(pi/2) is not complex. Should this bullet point be moved into the second of the three categories (in the Creation section)?

I haven't the foggiest what whoever put that inmust have been thinking of. I think the line should just be completely removed. tan never returns NaN except for infinity or NaN arguments so it is pretty well behaved. In fact I'll just go and remove it now thanks. 19:45, 17 July 2010 (UTC)

Indeterminate[edit]

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)

The missing reference there is [1]. There is no special 'indeterminate' value but he gives a useful way of thinking about sNaN and qNaN. Dmcq (talk) 09:32, 12 October 2010 (UTC)

trigonometric and inverse trigonometric functions[edit]

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)

Languages that use NaN[edit]

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)