aboutsummaryrefslogtreecommitdiff
path: root/math
AgeCommit message (Collapse)AuthorFilesLines
2013-12-05Move TEST_f_f tests for [l-y]* functions from libm-test.inc to ↵Joseph Myers4-809/+33381
auto-libm-test-in.
2013-12-04Fix Bessel function error handling (bug 6807, bug 15901).Joseph Myers9-27/+95
2013-12-03Fix exp missing underflows (bug 15268, bug 15425).Joseph Myers2-0/+216
2013-12-03Fix exp2 errno setting on underflow (bug 16283).Joseph Myers5-96/+92
2013-12-03Fix erfc errno setting on underflow (bug 6786).Joseph Myers2-6/+309
2013-12-03Move TEST_f_f tests for [e-j]* functions from libm-test.inc to ↵Joseph Myers4-211/+4325
auto-libm-test-in.
2013-11-30Move TEST_f_f tests for [a-c]* functions from libm-test.inc to ↵Joseph Myers4-252/+4818
auto-libm-test-in.
2013-11-29Fix exp10 errno setting on underflow (bug 6787).Joseph Myers4-5/+7
2013-11-29Fix x86 sqrt rounding (bug 14032).Joseph Myers2-0/+3726
2013-11-29Test sqrt in all rounding modes.Joseph Myers1-0/+88
2013-11-29Start generating libm tests automatically with MPFR.Joseph Myers6-19/+2110
2013-11-28Fix dbl-64 e_sqrt.c for non-default rounding modes (bug 16271).Joseph Myers1-0/+1
2013-11-19Make powerpc-nofpu floating-point state thread-local (bug 15483).Joseph Myers2-1/+210
2013-11-18test-fpucw-ieee: Don't use _FPU_IEEE if not definedChris Metcalf1-2/+5
Not all architectures define this value, and if they don't, just let the test run the same as test-fpucw, with __fpu_control set to _FPU_DEFAULT explicitly.
2013-11-16Test signs of NaNs in libm-test.inc where appropriate.Joseph Myers2-16/+43
2013-11-16Add libm-test support for ignored return value, add more lrint / llrint / ↵Joseph Myers2-12/+90
lround / llround tests.
2013-11-16Replace libm-test.inc TEST_INLINE conditionals with NO_TEST_INLINE flag.Joseph Myers2-258/+280
2013-11-16Make libm-test.inc check for "inexact" exceptions for NaN argument.Joseph Myers1-69/+69
2013-10-04PowerPC floating point little-endian [4 of 15]Alan Modra1-0/+19
http://sourceware.org/ml/libc-alpha/2013-08/msg00084.html Another batch of ieee854 macros and union replacement. These four files also have bugs fixed with this patch. The fact that the two doubles in an IBM long double may have different signs means that negation and absolute value operations can't just twiddle one sign bit as you can with ieee864 style extended double. fmodl, remainderl, erfl and erfcl all had errors of this type. erfl also returned +1 for large magnitude negative input where it should return -1. The hypotl error is innocuous since the value adjusted twice is only used as a flag. The e_hypotl.c tests for large "a" and small "b" are mutually exclusive because we've already exited when x/y > 2**120. That allows some further small simplifications. [BZ #15734], [BZ #15735] * sysdeps/ieee754/ldbl-128ibm/e_fmodl.c (__ieee754_fmodl): Rewrite all uses of ieee875 long double macros and unions. Simplify test for 0.0L. Correct |x|<|y| and |x|=|y| test. Use ldbl_extract_mantissa value for ix,iy exponents. Properly normalize after ldbl_extract_mantissa, and don't add hidden bit already handled. Don't treat low word of ieee854 mantissa like low word of IBM long double and mask off bit when testing for zero. * sysdeps/ieee754/ldbl-128ibm/e_hypotl.c (__ieee754_hypotl): Rewrite all uses of ieee875 long double macros and unions. Simplify tests for 0.0L and inf. Correct double adjustment of k. Delete dead code adjusting ha,hb. Simplify code setting kld. Delete two600 and two1022, instead use their values. Recognise that tests for large "a" and small "b" are mutually exclusive. Rename vars. Comment. * sysdeps/ieee754/ldbl-128ibm/e_remainderl.c (__ieee754_remainderl): Rewrite all uses of ieee875 long double macros and unions. Simplify test for 0.0L and nan. Correct negation. * sysdeps/ieee754/ldbl-128ibm/s_erfl.c (__erfl): Rewrite all uses of ieee875 long double macros and unions. Correct output for large magnitude x. Correct absolute value calculation. (__erfcl): Likewise. * math/libm-test.inc: Add tests for errors discovered in IBM long double versions of fmodl, remainderl, erfl and erfcl.
2013-10-04PowerPC floating point little-endian [1 of 15]Alan Modra1-214/+75
http://sourceware.org/ml/libc-alpha/2013-08/msg00081.html This is the first of a series of patches to ban ieee854_long_double and the ieee854_long_double macros when using IBM long double. union ieee854_long_double just isn't correct for IBM long double, especially when little-endian, and pretending it is OK has allowed a number of bugs to remain undetected in sysdeps/ieee754/ldbl-128ibm/. This changes the few places in generic code that use it. * stdio-common/printf_size.c (__printf_size): Don't use union ieee854_long_double in fpnum union. * stdio-common/printf_fphex.c (__printf_fphex): Likewise. Use signbit macro to retrieve sign from long double. * stdio-common/printf_fp.c (___printf_fp): Use signbit macro to retrieve sign from long double. * sysdeps/ieee754/ldbl-128ibm/printf_fphex.c: Adjust for fpnum change. * sysdeps/ieee754/ldbl-128/printf_fphex.c: Likewise. * sysdeps/ieee754/ldbl-96/printf_fphex.c: Likewise. * sysdeps/x86_64/fpu/printf_fphex.c: Likewise. * math/test-misc.c (main): Don't use union ieee854_long_double. ports/ * sysdeps/ia64/fpu/printf_fphex.c: Adjust for fpnum change.
2013-09-19New test cases for sin and cos for multiple precision fallbackSiddhesh Poyarekar1-0/+18
2013-09-09Fix static-binary lazy FPU context allocationMaciej W. Rozycki5-7/+40
Long ago static startup did not parse the auxiliary vector and therefore could not get at any `AT_FPUCW' tag to check whether upon FPU context allocation the kernel would use a FPU control word setting different to that provided by the `__fpu_control' variable. Static startup therefore always initialized the FPU control word, forcing immediate FPU context allocation even for binaries that otherwise never used the FPU. As from GIT commit f8f900ecb9096ec47f5b7bb7626e29223c69061a static startup supports parsing the auxiliary vector, so now it can avoid explicit initialization of the FPU control word, just as can dynamic startup, in the usual case where the setting written to the FPU control word would be the same as the kernel uses. This defers FPU context allocation until the binary itself actually pokes at the FPU. Note that the `AT_FPUCW' tag is usually absent from the auxiliary vector in which case _FPU_DEFAULT is assumed to be the kernel default.
2013-09-03Fix lgammaf spurious underflow (bug 15427).Joseph Myers1-0/+55
2013-09-02Fix spurious jnf underflows (bug 14155).Joseph Myers1-2/+17
2013-08-29math: Additional type conversion testsThomas Schwinge1-7/+13
These have helped me find and fix type conversion issues in QEMU's MIPS hardware emulation. While certainly glibc is not the best place for such tests, they're just an enhancement of tests already present.
2013-08-23Fix cexp (NaN + i0) (bug 15532).Joseph Myers4-13/+32
2013-08-21Fix fdim handling of infinities (bug 15797).Joseph Myers4-39/+43
2013-08-20Fix cproj handling of (finite, NaN) arguments (bug 15531).Joseph Myers4-9/+43
2013-08-13Fix cbrtl for ldbl-96Andreas Schwab1-0/+5
2013-07-13Annotate more cases of math bug 15319.David S. Miller1-16/+20
* math/libm-test.inc (casin_test_data): Annotate more cases of missing underflows from atanl/atan2l due to bug 15319. (casinh_test_data): Likewise.
2013-06-20Allow fesetround failures in math/test-misc.c if ROUNDING_TESTS fails.Joseph Myers1-1/+5
2013-06-20Avoid spurious failures from <fenv.h> fallback functions (bug 15654).Joseph Myers10-15/+27
2013-06-17Use math-tests.h more in math/test-misc.Joseph Myers1-2/+10
2013-06-15Add another fma test.Joseph Myers1-0/+1
2013-06-12Make more libm tests condition exceptions tests with math-tests.h.Joseph Myers3-51/+54
2013-06-11Add exception information to math-tests.h and use it in libm-test.inc.Joseph Myers1-17/+21
2013-06-10Add rounding mode information to math-tests.h and use it in libm-test.inc.Joseph Myers1-4/+9
2013-06-05Remove trailing whitespace.Joseph Myers1-1/+1
2013-06-03BZ #15536: Fix ulp for 128-bit IBM long double.Carlos O'Donell1-11/+26
In 128-bit IBM long double the precision of the type decreases as you approach subnormal numbers, equaling that of a double for subnormal numbers. Therefore adjust the computation in ulp to use 2^(MIN_EXP - MANT_DIG) which is correct for FP_SUBNORMAL for all types.
2013-05-31Link extra-libs consistently with libc and ld.so.Joseph Myers1-5/+0
2013-05-24Fix ldbl-96 hypotl of subnormals (bug 15529).Joseph Myers1-0/+13
2013-05-24Test drem and pow10 in libm-test.inc.Joseph Myers1-5/+63
2013-05-24Use same tests for isfinite/finite, lgamma/gamma.Joseph Myers1-44/+18
2013-05-24Correctly compute ulp near zero.Carlos O'Donell1-48/+93
The current value used for ulp near zero is wrong, and this commit fixes it such that ulp(0) is the smallest subnormal value nearest to zero, which makes the most sense for testing values near zero. Note that this is not what Java does; they use the nearest normal value, which is less accurate than what we want for glibc. Note that there is no correct implementation of ulp since there is no strict mathmatical definition that is accepted by all groups using IEEE 754. Previously with the large ulp values near zero there were tests that previously passed, but were in fact billions of ulp away from the precise answer. With this commit we now need to disable one of the cpow tests which is revealed to be inaccurate (bug 14473). --- 2013-05-24 Carlos O'Donell <carlos@redhat.com> * math/libm-test.inc (MAX_EXP): Define. (ULPDIFF): Define. (ulp): New function. (check_float_internal): Use ULPDIFF. (cpow_test): Disable failing test. (check_ulp): Test ulp() implemetnation. (main): Call check_ulp before starting tests.
2013-05-24Remove libm-test START_DATA and END_DATA.Joseph Myers2-347/+0
2013-05-24Make libm-test START and END into ordinary macros.Joseph Myers2-197/+176
2013-05-22Don't include function names in test data in generated libm-test.c.Joseph Myers2-132/+241
2013-05-22Don't include expected results in libm-test test names.Joseph Myers1-4/+1
2013-05-19Handle sincos with generic libm-test logic.Joseph Myers3-86/+56
2013-05-19Simplify gen-libm-test.pl handling of tests with extra outputs.Joseph Myers1-65/+17