about summary refs log tree commit diff
path: root/sysdeps/x86_64/fpu
Commit message (Collapse)AuthorAgeFilesLines
* Move tests of sincos from libm-test.inc to auto-libm-test-in.Joseph Myers2013-12-191-0/+6
| | | | | | | | | | | | | | | | | | | | This patch moves tests of sincos to auto-libm-test-in, adding the required support to gen-auto-libm-tests. Tested x86_64 and x86 and ulps updated accordingly. (auto-libm-test-out diffs omitted below.) * math/auto-libm-test-in: Add tests of sincos. * math/auto-libm-test-out: Regenerated. * math/libm-test.inc (sincos_test_data): Use AUTO_TESTS_fFF_11. * math/gen-auto-libm-tests.c (func_calc_method): Add value mpfr_f_11. (func_calc_desc): Add mpfr_f_11 union field. (test_functions): Add sincos. (calc_generic_results): Handle mpfr_f_11. * sysdeps/i386/fpu/libm-test-ulps: Update. * sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
* Disable libm-test test name beautification for M_* constants.Joseph Myers2013-12-191-0/+5
| | | | | | | | | | | | | | | | | | | | | math/gen-libm-test.pl has code to beautify names of various constants, transforming the source form in libm-test.inc into the version appearing in test names in libm-test-ulps files. This has become decreasingly relevant over time for the M_* constants, first as I changed the test names so only the arguments and not the expected results appeared in them, then as tests have moved to auto-libm-test-* so that automatically generated hex float constants get used instead of M_* in test inputs. This patch removes the beautification for all M_* constants. Tested x86_64 and x86 and ulps updated accordingly. Even the one case where this affected the name in the ulps files will disappear once complex function tests are moved to auto-libm-test-*. * math/gen-libm-test.pl (%beautify): Remove M_* constants. * sysdeps/i386/fpu/libm-test-ulps: Update. * sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
* Fix x86/x86_64 expm1 inaccuracy near 0 in directed rounding modes (bug 16293).Joseph Myers2013-12-192-0/+330
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug 16293 is inaccuracy of x86/x86_64 versions of expm1, near 0 in directed rounding modes, that arises from frndint rounding the exponent to 1 or -1 instead of 0, resulting in large cancellation error. This inaccuracy in turn affects other functions such as sinh that use expm1. This patch fixes the problem by setting round-to-nearest mode temporarily around the affected calls to frndint. I don't think this is needed for other uses of frndint, such as in exp itself, as only for expm1 is the cancellation error significant. Tested x86_64 and x86 and ulps updated accordingly. * sysdeps/i386/fpu/e_expl.S (IEEE754_EXPL) [USE_AS_EXPM1L]: Set round-to-nearest mode when using frndint. * sysdeps/i386/fpu/s_expm1.S (__expm1): Likewise. * sysdeps/i386/fpu/s_expm1f.S (__expm1f): Likewise. * sysdeps/x86_64/fpu/e_expl.S (IEEE754_EXPL) [USE_AS_EXPM1L]: Likewise. * math/auto-libm-test-in: Add more tests of expm1. Do not expect sinh test to fail. * math/auto-libm-test-out: Regenerated. * math/libm-test.inc (TEST_COND_x86_64): Remove macro. (TEST_COND_x86): Likewise. (expm1_tonearest_test_data): New array. (expm1_test_tonearest): New function. (expm1_towardzero_test_data): New array. (expm1_test_towardzero): New function. (expm1_downward_test_data): New array. (expm1_test_downward): New function. (expm1_upward_test_data): New array. (expm1_test_upward): New function. (main): Run the new test functions. * sysdeps/i386/fpu/libm-test-ulps: Update. * sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
* Move tests of jn and yn from libm-test.inc to auto-libm-test-in.Joseph Myers2013-12-181-2/+443
| | | | | | | | | | | | | | | | | | | | | | | | | This patch moves tests of jn and yn to auto-libm-test-in, adding the required support for gen-auto-libm-tests (and adding a missing assertion there and fixing logic that was broken for functions with integer arguments). Tested x86_64 and x86 and ulps updated accordingly. * math/auto-libm-test-in: Add tests of jn and yn. * math/auto-libm-test-out: Regenerated. * math/libm-test.inc (jn_test_data): Use AUTO_TESTS_if_f. (yn_test_data): Likewise. * math/gen-auto-libm-tests.c (func_calc_method): Add value mpfr_if_f. (func_calc_desc): Add mpfr_if_f union field. (FUNC_mpfr_if_f): New macro. (test_functions): Add jn and yn. (calc_generic_results): Assert type of second input for mpfr_ff_f. Handle mpfr_if_f. (output_for_one_input_case): Disable all checking for arguments fitting floating-point types in case of an integer argument. * sysdeps/i386/fpu/libm-test-ulps: Update. * sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
* Fix ldbl-128 logl for subnormals (bug 16338).Joseph Myers2013-12-181-0/+3
| | | | | | | | | | | | | | | | | | | | | | This patch fixes bug 16338, ldbl-128 logl not handling subnormals (with consequent inaccuracy for lgammal as well). The fix is simply to use __frexpl when determining the exponent, as done already in log2l and log10l. Given the lack of testing of small arguments to any of the log* functions, appropriate tests are added for all of them. Tested x86_64 and x86 and ulps updated accordingly, and spot tests also run for mips64 to confirm the ldbl-128 fix. Note that while this fixes lgammal inaccuracy for small positive arguments, I suspect that there will still be problems with spurious underflows in that case. * sysdeps/ieee754/ldbl-128/e_logl.c (__ieee754_logl): Use __frexpl to determine exponent and adjust argument to have exponent of -1. * math/auto-libm-test-in: Add more tests of log, log10, log1p and log2. * math/auto-libm-test-out: Regenerated. * sysdeps/x86_64/fpu/libm-test-ulps: Update.
* Move tests of atan2, hypot and pow from libm-test.inc to auto-libm-test-in.Joseph Myers2013-12-161-0/+153
|
* Update x86_64 ULps for AMD K10Markus Trippelsdorf2013-12-091-2/+8
|
* Move tests of lgamma from libm-test.inc to auto-libm-test-in.Joseph Myers2013-12-081-0/+80
|
* Fix tgamma errno setting on underflow (bug 6810).Joseph Myers2013-12-051-0/+3
|
* Move TEST_f_f tests for [l-y]* functions from libm-test.inc to ↵Joseph Myers2013-12-051-4/+2104
| | | | auto-libm-test-in.
* Fix Bessel function error handling (bug 6807, bug 15901).Joseph Myers2013-12-041-0/+5
|
* Fix exp missing underflows (bug 15268, bug 15425).Joseph Myers2013-12-031-0/+52
|
* Fix erfc errno setting on underflow (bug 6786).Joseph Myers2013-12-031-0/+3
|
* Move TEST_f_f tests for [e-j]* functions from libm-test.inc to ↵Joseph Myers2013-12-031-0/+244
| | | | auto-libm-test-in.
* Move TEST_f_f tests for [a-c]* functions from libm-test.inc to ↵Joseph Myers2013-11-301-0/+653
| | | | auto-libm-test-in.
* Fix dbl-64 e_sqrt.c for non-default rounding modes (bug 16271).Joseph Myers2013-11-281-0/+1
|
* Fix spurious "inexact" exceptions from x86 pow with NaN argument (bug 16167).Joseph Myers2013-11-161-0/+3
|
* PowerPC floating point little-endian [1 of 15]Alan Modra2013-10-041-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Fix lgammaf spurious underflow (bug 15427).Joseph Myers2013-09-031-0/+56
|
* Fix spurious jnf underflows (bug 14155).Joseph Myers2013-09-021-2/+17
|
* Fix typos.Ondřej Bílka2013-08-211-1/+1
|
* Update x86 and x86_64 ulps on AMD FX-8350 with GCC 4.8.1.Jeroen Albers2013-07-051-14/+133
|
* Update x86_64 ULPs.Markus Trippelsdorf2013-07-021-2/+318
|
* Regenerate x86 and x86_64 ulps.Joseph Myers2013-07-021-833/+43
|
* Remove trailing whitespace.Joseph Myers2013-06-052-2/+2
|
* Test drem and pow10 in libm-test.inc.Joseph Myers2013-05-241-0/+26
|
* Use same tests for isfinite/finite, lgamma/gamma.Joseph Myers2013-05-241-0/+16
|
* Don't include expected results in libm-test test names.Joseph Myers2013-05-221-2154/+2154
|
* Handle sincos with generic libm-test logic.Joseph Myers2013-05-191-6/+6
|
* Use movq for 64-bit operationsPeter Collingbourne2013-05-151-2/+4
| | | | | | | | | | | The EXTRACT_WORDS64 and INSERT_WORDS64 macros use movd for a 64-bit operation. Somehow gcc manages to turn this into movq, but LLVM won't. 2013-05-15 Peter Collingbourne <pcc@google.com> * sysdeps/x86_64/fpu/math_private.h (MOVQ): New macro. (EXTRACT_WORDS64) Use where appropriate. (INSERT_WORDS64) Likewise.
* Use x constraints for operands to vfmaddss and vfmaddsdPeter Collingbourne2013-05-152-2/+2
| | | | | | | | | | | | | | | While these instructions accept memory operands, only one operand may be a memory operand. Giving two operands xm constraints gives the compiler the option of using memory for both operands, which would result in invalid assembly code. Using x for all operands is more appropriate, as most x86_64 calling conventions will pass the arguments in registers anyway. 2013-05-15 Peter Collingbourne <pcc@google.com> * sysdeps/x86_64/fpu/multiarch/s_fma.c (__fma_fma4): Replace xm constraints with x constraints. * sysdeps/x86_64/fpu/multiarch/s_fmaf.c (__fmaf_fma4): Likewise.
* Improve tgamma accuracy (bugs 2546, 2560, 5159, 15426).Joseph Myers2013-05-081-6/+670
|
* Fix catan, catanh spurious underflows (bug 15423).Joseph Myers2013-05-011-0/+232
|
* Fix catan, catanh inaccuracy from atan2 denominators near 0 (bug 15416).Joseph Myers2013-04-301-2/+420
|
* Fix catan, catanh spurious overflows (bug 15409).Joseph Myers2013-04-271-0/+82
|
* Update x86_64 ULPsMarkus Trippelsdorf2013-04-261-0/+244
| | | | | | 2013-04-26 Markus Trippelsdorf <markus@trippelsdorf.de> * sysdeps/x86_64/fpu/libm-test-ulps: Update.
* Fix catan, catanh inaccuracy through use of log (bug 15394).Joseph Myers2013-04-241-0/+2
|
* libm-test.inc: Fix tests where cos(PI/2) != 0.Carlos O'Donell2013-04-111-14/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The value of PI is never exactly PI in any floating point representation, and the value of PI/2 is never PI/2. It is wrong to expect cos(M_PI_2l) to return 0, instead it will return an answer that is non-zero because M_PI_2l doesn't round to exactly PI/2 in the type used. That is to say that the correct answer is to do the following: * Take PI or PI/2. * Round to the floating point representation. * Take the rounded value and compute an infinite precision cos or sin. * Use the rounded result of the infinite precision cos or sin as the answer to the test. I used printf to do the type rounding, and Wolfram's Alpha to do the infinite precision cos calculations. The following changes bring x86-64 and x86 to 1/2 ulp for two tests. It shows that the x86 cos implementation is quite good, and that our test are flawed. Unfortunately given that the rounding errors are type dependent we need to fix this for each type. No regressions on x86-64 or x86. --- 2013-04-11 Carlos O'Donell <carlos@redhat.com> * math/libm-test.inc (cos_test): Fix PI/2 test. (sincos_test): Likewise. * sysdeps/x86_64/fpu/libm-test-ulps: Regenerate. * sysdeps/i386/fpu/libm-test-ulps: Regenerate.
* Fix cacosh inaccuracy and spurious exceptions (bug 15327).Joseph Myers2013-04-021-27/+942
|
* Fix casinh inaccuracy for imaginary part < 1.0, real part small (bug 10357).Joseph Myers2013-03-301-145/+1235
|
* Fix casinh inaccuracy near i, imaginary part > 1 (bug 15307).Joseph Myers2013-03-271-0/+368
|
* Fix casinh inaccuracy for argument with imaginary part 1 (bug 15287).Joseph Myers2013-03-211-2/+788
|
* Fix y1l spurious overflows for ldbl-96 (bug 15283).Joseph Myers2013-03-161-0/+12
|
* New __sqr function as a faster special case of __mulSiddhesh Poyarekar2013-02-142-0/+2
|
* Fix casinh spurious underflows away from [-i,i] (bug 15062).Joseph Myers2013-01-311-0/+186
|
* Fix cacos real-part inaccuracy for result real part near 0 (bug 15023).Joseph Myers2013-01-171-0/+15
|
* Fix casinh, casin overflow (bug 14996).Joseph Myers2013-01-071-0/+12
|
* Fix casinh, casin inaccuracy from cancellation (bug 14994).Joseph Myers2013-01-041-0/+29
|
* Update copyright notices with scripts/update-copyrights.Joseph Myers2013-01-0250-51/+50
|
* Move mpone out to a global constSiddhesh Poyarekar2012-12-272-0/+2
| | | | Code cleanup.