This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: fmax/fmin sNaN compatibility question
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: joseph at codesourcery dot com (Joseph Myers)
- Cc: libc-alpha at sourceware dot org
- Date: Tue, 10 Dec 2019 11:43:58 +0100 (CET)
- Subject: Re: fmax/fmin sNaN compatibility question
Joseph Myers wrote:
> On Mon, 9 Dec 2019, Ulrich Weigand wrote:
> > Do you know why the sample implementation was even updated then?
> > If FP_SNANS_ALWAYS_SIGNAL is false, shouldn't the C11 method then
> > still be OK?
>
> The canonicalize call is needed in general to avoid propagating
> noncanonical DFP encodings, though not relevant for binary FP.
But it does change the behavior for binary FP as well, as far
as I can see: e.g. if both inputs are sNaNs, the C11 method
would return one of those sNaNs unchanged, while the C2x method
will return a qNaN (as the canonicalize call will quiet the
sNaN it receives as input), right?
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU/Linux compilers and toolchain
Ulrich.Weigand@de.ibm.com