newlib-cygwin/newlib/libm
Fabian Schriever 1b7c72fdcc powf: Fixed another precision bug in powf() (FreeBSD)
Fixed another precision bug in powf(). This one is in the computation
[t=p_l+p_h High]. We multiply t by lg2_h, and want the result to be
exact. For the bogus float case of the high-low decomposition trick, we
normally discard the lowest 12 bits of the fraction for the high part,
keeping 12 bits of precision. That was used for t here, but it doesnt't
work because for some reason we only discard the lowest 9 bits in the
fraction for lg2_h.  Discard another 3 bits of the fraction for t to
compensate.

This bug gave wrong results like:

powf(0.9999999, -2.9999995) = 1.0000002 (should be 1.0000001)
hex values: 3F7FFFFF C03FFFFE 3F800002 3F800001

As explained in the log for the previous commit, the bug is normally
masked by doing float calculations in extra precision on i386's, but is
easily detected by ucbtest on systems that don't have accidental extra
precision.

Reference: 5f20e5ce7f
Original Author: Bruce Evans
2024-09-19 13:58:50 -04:00
..
common Fix rounding results in lrint() & llrint() when close to 0 2023-07-27 11:14:12 +02:00
complex newlib: libm: skip "long double" complex functions if long double != double 2024-06-06 13:19:06 -04:00
fenv newlib: docs: add "Function " to every function node 2024-01-22 21:58:58 -05:00
ld newlib: Add more FreeBSD files for non LDBL_EQ_DBL support 2024-07-16 15:19:21 -04:00
ld80 newlib: Add more FreeBSD files for non LDBL_EQ_DBL support 2024-07-16 15:19:21 -04:00
ld128 newlib: Add more FreeBSD files for non LDBL_EQ_DBL support 2024-07-16 15:19:21 -04:00
machine newlib: xtensa: remove sys/xtensa. use machine/xtensa 2024-09-02 22:16:59 +02:00
math powf: Fixed another precision bug in powf() (FreeBSD) 2024-09-19 13:58:50 -04:00
mathfp newlib: docs: add "Function " to every function node 2024-01-22 21:58:58 -05:00
test newlib: libm: integrate tests subdir 2022-03-16 22:01:19 -04:00
Makefile.inc RISC-V: Support long double math 2023-12-04 10:26:41 +01:00
acinclude.m4 newlib: add Xtensa port 2023-08-17 18:14:15 -04:00
libm.in.xml fenv: Include documentation in generated .info file 2019-08-15 12:04:50 +02:00
libm.texi newlib: docs: print the function index 2024-01-22 21:58:58 -05:00