Date: Wed, 15 Mar 2000 17:22:16 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Hans-Bernhard Broeker cc: djgpp-workers AT delorie DOT com Subject: Re: Unnormals??? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp-workers AT delorie DOT com Errors-To: dj-admin AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Wed, 15 Mar 2000, Hans-Bernhard Broeker wrote: > > Perhaps, it would be preferable, to print "nan(unnormal)" for the > > unnormal case, to be std conform. > > *If* an unnormal is a NaN, yes. How can one tell? If the standard doesn't define what is a NaN (as I think it doesn't), then the answer is platform-dependent, and we are back to the Intel manuals which define this. > The question still hovering in my head > would then be what the difference is between a subnormal (supposed to be > detectable by C99 functions) and an unnormal (mentioned nowhere in the > whole draft). I remember having discussed this before, on this list, but > not the details... Let me remind you. Unnormal (a name I picked up from Robert Hummel's superb "The Processor and Coprocessor" book) is a denormal with a biased exponent greater than zero. In other words, it's a long double number whose mantissa's MSB is zero, but whose unbiased exponent is greater than the minimum supported exponent. > Subnormals as defined by C99 are fp numbers with smallest possible > exponent, and a mantissa smaller than 0.5 (i.e. no leading one-bit). These > can only happen for 'long double', indeed, as the other formats use a > hidden leading one-bit for the mantissa. Likewise for the unnormal: it can only happen for a long double.