This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Simplify HUGE_VAL definitions [committed]
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Zack Weinberg <zackw at panix dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Thu, 31 Aug 2017 16:53:23 +0000
- Subject: Re: Simplify HUGE_VAL definitions [committed]
- Authentication-results: sourceware.org; auth=none
- References: <alpine.DEB.2.20.1708311551080.24662@digraph.polyomino.org.uk> <CAKCAbMhj_gmveaW6G-sj=vPzr30N3m_+hb-0TtFYzd9v4bCptw@mail.gmail.com>
On Thu, 31 Aug 2017, Zack Weinberg wrote:
> > +/* Value returned on overflow. On all IEEE754 machines, this is
> > + +Infinity. */
>
> suggested wording is
>
> /* Value returned on overflow; with IEEE 754 floating point, this is
> +Infinity, otherwise the largest representable positive value.
>
> GCC >=3.3 and compatible compilers provide an intrinsic function,
> usable in constant expressions, that gives this value. Otherwise
> use a numeric constant larger than the largest representable finite
> value in any supported floating-point format; in the normal
> rounding mode, ISO C requires this to be rounded to +Infinity, if
> it exists, or else to the largest representable positive value.
> (The intrinsic function is preferred because it will not produce
> warnings about overflow and is not affected by rounding mode.) */
"the rounding mode", in the last line. OK with that change.
--
Joseph S. Myers
joseph@codesourcery.com