|
Message-ID: <20200223152147.GO1663@brightrain.aerifal.cx> Date: Sun, 23 Feb 2020 10:21:47 -0500 From: Rich Felker <dalias@...c.org> To: musl@...ts.openwall.com Subject: Re: Min and Max of 2 Floating Point numbers On Sun, Feb 23, 2020 at 06:08:25PM +1100, Damian McGuckin wrote: > The IEEE 754-2019 standard has changed the definition so as to > properly propogate NaNs. The 1.2.0 version I just downloaded still > follows the > 2008 definition. > > ARM is smart enough to have 2 instructions, one (FMAX) which did > propogate NaNs and one (FMAXNM) which follows the 2008 standard. > That said, I do not personally compile on an ARM so I have no idea > how you ask for FMAX or how you ask for FMAXNM? > > The PowerPC ISA 3.0 instruction properly propogates NaNs so it > agrees with the new standard. > > The Intel instruction follows neither standard as far as I can tell. An > interesting condition. > > Please tell me if I am wrong. I'm not particularly aware of what the insns do. However.. > MUSL relevance: I believe that even in 1.2.0, MUSL's own fmax/fmin libc > routines violate the IEEE 754-2019 standard which came out recently. > Well, it was approved June, published July, released November. I > think that is recent. Unless by "propagate nans" you mean some specific behavior beyond preserving one of the input nans, I don't see how we're violating it. The < operator is only used if there are no nans and the signs are the same. Rich
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.