This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Remove misleading statement about raising of FE_INVALID (bug 24078)
- From: Joseph Myers <joseph at codesourcery dot com>
- To: "Gabriel F. T. Gomes" <gabriel at inconstante dot eti dot br>
- Cc: <libc-alpha at sourceware dot org>, <gromero at linux dot vnet dot ibm dot com>
- Date: Wed, 9 Jan 2019 21:20:23 +0000
- Subject: Re: [PATCH] Remove misleading statement about raising of FE_INVALID (bug 24078)
- References: <20190109184223.32577-1-gabriel@inconstante.eti.br>
On Wed, 9 Jan 2019, Gabriel F. T. Gomes wrote:
> See bugzilla entry for a longer description.
>
> -- 8< --
> In the floating-point comparisons `==' and `<', there is no difference
> in behavior when it comes to the raising of FE_INVALID exceptions. This
> patch removes, from the manual, a sentence that states otherwise.
This change is incorrect. == and != do not raise exceptions except for
signaling NaNs; ordered comparisons raise exceptions for both quiet and
signaling NaNs (you can use the is* macros from C99 to avoid exceptions
for quiet NaNs for ordered comparisons, and iseqsig from TS 18661-1 to get
exceptions for quiet NaNs for equality comparisons).
--
Joseph S. Myers
joseph@codesourcery.com