mirror of
git://sourceware.org/git/glibc.git
synced 2025-03-06 20:58:33 +01:00
Single-precision remainderf() and quad-precision remainderl() implementation derived from Sun is affected by an issue when the result is +-0. IEEE754 requires that if remainder(x, y) = 0, its sign shall be that of x regardless of the rounding direction. The implementation seems to have assumed that x - x = +0 in all rounding modes, which is not the case. When rounding direction is roundTowardNegative the sign of an exact zero sum (or difference) is −0. Regression tests that triggered this erroneous behavior are added to math/libm-test-remainder.inc. Tested for cross riscv64 and powerpc. Original fix by: Bruce Evans <bde@FreeBSD.org> in FreeBSD's a2ddfa5ea726c56dbf825763ad371c261b89b7c7. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org> |
||
---|---|---|
.. | ||
dbl-64 | ||
float128 | ||
flt-32 | ||
ldbl-64-128 | ||
ldbl-96 | ||
ldbl-128 | ||
ldbl-128ibm | ||
ldbl-128ibm-compat | ||
ldbl-opt | ||
soft-fp | ||
ieee754.h | ||
k_standard.c | ||
k_standardf.c | ||
k_standardl.c | ||
libm-alias-finite.h | ||
Makefile | ||
s_lib_version.c | ||
s_matherr.c | ||
s_signgam.c |