fmax/fmin sNaN compatibility question
Ulrich Weigand
uweigand@de.ibm.com
Tue Dec 10 18:39:00 GMT 2019
Joseph Myers wrote:
> On Tue, 10 Dec 2019, Ulrich Weigand wrote:
>
> > 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?
>
> The handling of sNaN is explicitly implementation-defined when
> FE_SNANS_ALWAYS_SIGNAL is not defined, so that example implementation
> should not be used to infer anything about how sNaN should be handled.
OK, got it. I think it starts making sense now :-)
Thanks for your help!
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU/Linux compilers and toolchain
Ulrich.Weigand@de.ibm.com
More information about the Libc-alpha
mailing list