delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/03/15/10:44:34

Date: Wed, 15 Mar 2000 17:22:16 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>
cc: djgpp-workers AT delorie DOT com
Subject: Re: Unnormals???
In-Reply-To: <Pine.LNX.4.10.10003151444120.21378-100000@acp3bf>
Message-ID: <Pine.SUN.3.91.1000315171528.20407C-100000@is>
MIME-Version: 1.0
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

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.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019