Message-Id: <200003221719.MAA17164@delorie.com> From: "Dieter Buerssner" To: djgpp-workers AT delorie DOT com Date: Wed, 22 Mar 2000 18:19:40 +0100 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: Unnormals??? CC: Eli Zaretskii References: <200003221407 DOT JAA07300 AT delorie DOT com> In-reply-to: X-mailer: Pegasus Mail for Win32 (v3.12b) Reply-To: djgpp-workers AT delorie DOT com On 22 Mar 00, at 15:44, Hans-Bernhard Broeker wrote: [I added four zeroes in the next two lines] > > > pos_nanshort = 7fff 0001 0000 0000 0000 > > > neg_nanshort = ffff 0001 0000 0000 0000 [...] > So they are 'Pseudo-NaN', in the sense that they look a bit like NaN, > but aren't, as they do not have the leading '1' bit in the mantissa > required for NaNs, or any number that is not an unnormal. I admit, that I have chosen the example numbers very unluckily. I just wanted to show, that you can use the casting method to load such numbers into an FPU register. I apologize for giving wrong information. That I thought, that these numbers are "normal" NaNs comes from the reading of a paper by David Goldberg (What every Computer Scientist should know about Floating-Point Aritmetic). In this paper he defines a IEEE NaN as any number with an exponent of emax+1 and any non-zero mantissa. I think David Goldberg was working on the IEEE standards, so I trusted this definition. Anyway, to be in conformance with C99 for printf, and to be consistant with copysign and signbit, I think for NaNs (quiet and signalling) and also for pseudo NaNs, printf should print [-]NAN. For unnormals, it could print [-]NAN(unnormal) or [-]NAN. BTW. Does anybody understand, what pseudo Infinities are? (Described in the Intel manual under 7.4.4) Regards, Dieter