4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-01-15 02:09:19 +08:00
Fabian Schriever a8a40ee575 Fix error in exp in magnitude [2e-32,2e-28]
While testing the exp function we noticed some errors at the specified
magnitude. Within this range the exp function returns the input value +1
as an output. We chose to run a test of 1m exponentially spaced values
in the ranges [-2^-27,-2^-32] and [2^-32,2^-27] which showed 7603 and
3912 results with an error of >=0.5 ULP (compared with MPFR in 128 bit)
with the highest being 0.56 ULP and 0.53 ULP.

It's easy to fix by changing the magnitude at which the input value +1
is returned from <2^-28 to <2^-32 and using the polynomial instead. This
reduces the number of results with an error of >=0.5 ULP to 485 and 479
in above tests, all of which are exactly 0.5 ULP.

As we were already checking on exp we also took a look at expf. For expf
the magnitude where the input value +1 is returned can be increased from
<2^-28 to <2^-23 without accuracy loss for a slight performance
improvement. To ensure this was the correct value we tested all values
in the ranges [-2^-17,-2^-28] and [2^-28,2^-17] (~92.3m values each).
2020-03-09 10:12:25 +01:00
..
2018-06-27 15:40:49 +02:00
2020-02-14 10:12:25 +01:00
2015-05-27 13:30:20 +02:00
2018-08-08 10:50:19 +02:00
2018-08-08 10:50:19 +02:00
2017-12-07 11:54:11 +00:00
2017-12-01 03:41:53 -06:00
2017-12-01 03:41:53 -06:00
2017-12-01 03:41:53 -06:00
2017-12-01 03:41:53 -06:00
2017-12-01 03:41:53 -06:00
2017-12-01 03:41:53 -06:00
2017-12-01 03:41:53 -06:00
2017-12-01 03:41:53 -06:00
2017-12-01 03:41:53 -06:00
2017-12-01 03:41:53 -06:00