Simplify HUGE_VAL definitions [committed]
Joseph Myers
joseph@codesourcery.com
Fri Sep 1 13:25:00 GMT 2017
On Fri, 1 Sep 2017, Zack Weinberg wrote:
> > Annex F requires conversions of constants (with at most DECIMAL_DIG
> > digits) to be to-nearest. (TS 18661-1 adds the FENV_ROUND pragma to
> > choose a different rounding mode for them and for certain operations.)
>
> Yes, but for any constant greater than <type>_MAX, <type>_MAX is
> arguably nearer to that constant than +Infinity is.
The IEEE rounding modes (all of them) define overflow on the basis of
whether the result with normal precision but infinite exponent range would
have an exponent that's too big (and in the case of overflow, the rounded
result is determined by the rounding mode, so +Inf for to-nearest).
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Libc-alpha
mailing list