Not A Number in IEEE Math

Reinhard Foessmeier foessmei at lan.informatik.tu-muenchen.dbp.de
Thu Feb 22 05:10:35 AEST 1990


In article <14266 at s.ms.uky.edu> simon at ms.uky.edu (G. Simon Gales) writes:
>I think that that behavior is correct.  
>
>	0.0 * (anything) = 0.0
>and
>	NaN / NaN = 1.0

Mi tradukis la libron			I translated the book
		
		The 8087 primer (J. Palmer, S. Morse)

en la germanan, kaj ^gi diras en	into German, and it says in chapter 2:
^cap. 2:

Kiam la 8087 plenumas instrukcion	Whenever the 8087 executes an
uzantan NaN-on, la normala reago	instruction that accesses a NaN
estas redoni la NaN-on kiel		as an operand the normal reaction
rezulton; se ambaw operaciatoj		is to return that NaN as a result.
estas NaN-oj, la rezulto estas la	if both operands are NaNs, the
NaN-o kun la pli granda signifikanto.	result is the NaN with the greater
					significand.

					(Sorry, no verbatim quotation;
					I have only my translation at hand.)

^Car Palmer kaj Morse kvazaw		Since Palmer and Morse sort of
inventis la normon IEEE P754,		invented the IEEE P754 standard
tio ^sajnas fidinda priskribo		this seems a fairly reliable
de la normo.				description of the standard behavior.
>
>Also a NaN/NaN situation is usually treated as 1, but this is definitely
>not intended to be a -correct- result.  If you end up with NaNs in your
>computation's results, you can't trust the answers you get.
>

Devus esti inverse: Sen NaN-oj en	It should be the other way round:
la rezulto oni povas (iom) fidi...	With no NaNs in your result you
>-- 					should have (some) faith in it...

>Simon Gales at The University of Kentucky
>   simon at ms.uky.edu             | 'Fate... protects fools, little children,
>   simon at UKMA.BITNET            |  and ships named Enterprise.' 
>   {rutgers, uunet}!ukma!simon  |                           - Riker, ST:TNG

Reinhard Foessmeier, TU Muenchen
_____________________________
--
Reinhard F\"ossmeier, Technische Univ. M\"unchen | "Sendmail can safely be made
foessmeier at infovax.informatik.tu-muenchen.dbp.de | setuid to root" (E. Allman:
   [ { relay.cs.net | unido.uucp } ]             | SM Install&Operation Guide)



More information about the Comp.lang.c mailing list