[Cfp-interest 2271] Re: Fwd: terminology issues

Vincent Lefevre vincent at vinc17.net
Mon Nov 15 07:32:25 PST 2021


On 2021-11-10 16:51:08 -0800, Jim Thomas wrote:
> > Begin forwarded message:
> > 
> > From: "Fred J. Tydeman" <tydeman at tybor.com>
> > Subject: Re: Fwd: [Cfp-interest 2258] terminology issues
> > Date: November 9, 2021 at 7:22:36 PM PST
> > To: "Jim Thomas" <jaswthomas at sbcglobal.net>
> > Reply-To: "Fred J. Tydeman" <tydeman.fred at gmail.com>
> > 
> > On Tue, 9 Nov 2021 17:18:43 -0800 Jim Thomas wrote:
> >> 
> >> Fred, do you know why 5.2.4.2.2 #7 was added? it was not in C99. I seem to recall it was added to address some specific problem.
> > 
> > N1320 by Tydeman (C89 defect 25)
> > Got added to C11 draft N1362

Rereading N1320...
  http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1320.htm

If infinities are supported, then everything is clearly defined.
Now, assume that infinities are not supported...

Before the proposed changes, Fred Tydeman said:

  Basiclly, a given real value is one of:
    * exactly representable, such as 0.0 and 1.0
    * bounded by two adjacent machine representations
    * not in the range of representable values

But according to the actual changes, the standard allows a 4th case
(because it just requires a *minimum* range of representable values):
a real value may be in the range of representable values, but above
the maximum representable value or below the minimum representable
value.

I don't think that this 4th case is an issue. And there are good
reasons to be in this 4th case: to take rounding into account.
For instance, it makes sense to regard values a bit larger than
DBL_MAX (in particular those less than DBL_MAX + 1/2 ulp) as being
in the range of representable values. In particular, this can be
useful when outputting a large value such as DBL_MAX in decimal
and reading it back. If the decimal value is larger than DBL_MAX
(due to rounding), one may not necessarily want to regard it as
being outside the range of representable values.

-- 
Vincent Lefèvre <vincent at vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)


More information about the Cfp-interest mailing list