4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-01-16 19:40:07 +08:00
Ray Donnelly 96fc528397 sqrt: Fix NaN propagation for IEEE Std 754-2008
The R language has some hacks specifically for mingw-w64 that
were caused by our handling of NaNs in sqrt(x). R uses a
special valued NaN to mean 'Not Available' and expects it to
be retained through various calculations. Our sqrt(x) doesn't
do this, instead it normalises such a NaN (retaining sign).

From:

http://wwwf.imperial.ac.uk/~drmii/M3SC_2016/IEEE_2008_4610935.pdf

"6.2.3 NaN propagation

An operation that propagates a NaN operand to its result and
has a single NaN as an input should produce a NaN with the
payload of the input NaN if representable in the destination
format."

There might even be a slight speed-up from this too.

Thanks to Duncan Murdoch for finding the reference.
2016-08-22 14:17:58 +02:00
..
2016-06-25 00:43:01 +02:00
2016-06-24 23:32:39 +02:00
2016-06-24 23:32:39 +02:00
2016-06-25 00:43:01 +02:00
2015-03-03 12:58:34 +00:00
2016-06-25 00:43:01 +02:00
2016-06-24 23:32:39 +02:00
2015-11-18 19:09:47 +01:00
2016-06-25 17:08:18 +01:00
2015-08-17 11:05:43 +02:00
2016-06-23 16:56:41 +02:00
2016-06-24 23:32:39 +02:00
2016-06-23 21:30:15 +02:00
2016-06-25 00:43:01 +02:00
2016-06-23 21:30:15 +02:00
2016-06-24 23:32:39 +02:00
2016-06-24 23:32:39 +02:00
2016-08-19 16:27:07 +02:00
2016-07-27 17:02:08 +01:00
2016-06-23 16:56:41 +02:00
2016-08-18 10:27:28 +02:00
2016-06-24 21:00:04 +02:00
2016-06-24 21:00:04 +02:00
2016-06-24 23:33:01 +02:00