about summary refs log tree commit diff
path: root/math
Commit message (Collapse)AuthorAgeFilesLines
* libm-test.inc: Fix tests where cos(PI/2) != 0.Carlos O'Donell2013-04-111-2/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Don't use run-via-rtld-prefix for anything other than testsSiddhesh Poyarekar2013-04-111-1/+1
| | | | | | | | | | run-via-rtld-prefix checks whether the program to be run is a static test and skips if it is. This is fine, except that it assumes that the program to be run is the second $^, which is true only for tests. This change creates an rtld-prefix, which is simply the dynamic linker prefix with the necessary arguments and uses that in the non-test targets.
* README.libm-test: Use testrun.sh to run libm test.Carlos O'Donell2013-04-061-2/+1
| | | | | | | | | | | | Document the use of the convenience testrun.sh script for running the libm test. --- 2013-04-06 Carlos O'Donell <carlos@redhat.com> * math/README.libm-test (How can I generate "libm-test-ulps"?): Use testrun.sh to run libm tests.
* New Makefile target `regen-ulps'.Carlos O'Donell2013-04-063-19/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The wiki "Regeneration" page has this to say about update ULPs. "The libm-test-ulps files are semiautomatically updated. To update an ulps baseline, run each of the failing tests (test-float, test-double, etc.) with -u; this will generate a file called ULPs; concatenate each of those files with the existing libm-test-ulps file, after removing any entries for particularly huge numbers of ulps that you do not want to mark as expected. Then run gen-libm-test.pl -n -u FILE where FILE is the concatenated file produced in the previous step. This generates a file called NewUlps which is the new sorted version of libm-test-ulps." The same information is listed in math/README.libm-test, and is a lot of manual work that you often want to run over-and-over again while working on a particular test. The `regen-ulps' convenience target does this automatically for developers. We strictly assume the source tree is readonly and add a new --output-dir option to libm-test.inc to allow for writing out ULPs to $(objpfx). When run the new target does the following: * Starts with the baseline ULPs file. * Runs each of the libm math tests with -u. * Adds new changes seen with -u to the baseline. * Sorts and prepares the test output with gen-libm-test.pl. * Leaves math/NewUlps in your build tree to copy to your source tree, cleanup, and checkin. The math test documentation in math/README.libm-test is updated document the new Makefile target. --- 2013-04-06 Carlos O'Donell <carlos@redhat.com> * Makefile.in (regen-ulps): New target. * math/Makefile [ifneq (no,$(PERL)]: Declare regen-ulps with .PHONY. [ifneq (no,$(PERL)] (run-regen-ulps): New variable. [ifneq (no,$(PERL)] (regen-ulps): New target. [ifeq (no,$(PERL)] (regen-ulps): New target. * math/libm-test.inc (ulps_file_name): Define. (output_dir): New variable. (options): Add "output-dir" option. (parse_opt): Handle 'o' case. (main): If output_dir is non-NULL use it as a prefix otherwise use "". * math/README.libm-test: Update `How can I generate "libm-test-ulps"?'
* [BZ #14686, #15336] Fix standard compliance. Don't use hard-coded qNaN values.Thomas Schwinge2013-04-051-0/+25
|
* Fix missing underflow from cexp (bug 14478).Joseph Myers2013-04-034-0/+39
|
* Fix cacosh inaccuracy and spurious exceptions (bug 15327).Joseph Myers2013-04-024-59/+639
|
* New <math.h> macro named issignaling to check for a signaling NaN (sNaN).Thomas Schwinge2013-04-028-15/+177
| | | | It is based on draft TS 18661 and currently enabled as a GNU extension.
* Fix casinh inaccuracy for imaginary part < 1.0, real part small (bug 10357).Joseph Myers2013-03-304-0/+1133
|
* Fix casinh inaccuracy near i, imaginary part > 1 (bug 15307).Joseph Myers2013-03-274-0/+491
|
* BZ#13889: expl (709.75) wrongly overflows for ldbl-128ibmAdhemerval Zanella2013-03-221-0/+3
| | | | | | The patch increase the high value to check if expl overflows. Current high mark value is not really correct, the algorithm accepts high values. It also adds a correct wrapper function to check for overflow and underflow.
* libm-test: Properly wrap blocks consisting of several statements.Thomas Schwinge2013-03-211-8/+14
|
* On 32-bit x86, disable certain tests involving sNaN values.Thomas Schwinge2013-03-211-10/+22
| | | | Follow-up to commit 495ded2c8c1eb8c0ac4b54add2dd397852e19cba.
* Fix Bessel function spurious overflows for ldbl-128 / ldbl-128ibm (bug 15285).Joseph Myers2013-03-211-0/+4
|
* Fix casinh inaccuracy for argument with imaginary part 1 (bug 15287).Joseph Myers2013-03-214-0/+332
|
* Fix types of constants in k_casinh*.c.Joseph Myers2013-03-192-4/+4
|
* Fix y1l spurious overflows for ldbl-96 (bug 15283).Joseph Myers2013-03-161-0/+20
|
* Fix spurious underflow exceptions for Bessel functions for ldbl-128 / ↵Joseph Myers2013-03-161-8/+4
| | | | ldbl-128ibm (bug 14155).
* Move "-sNaN" value into a separate variable.Thomas Schwinge2013-03-161-6/+9
|
* * math/libm-test.inc (ldexp_test): Add missing START/END markers.Thomas Schwinge2013-03-151-0/+4
|
* Promote a math test for sNaN handling to the top-level.Thomas Schwinge2013-03-152-1/+337
|
* Use GCC's builtins for generating NaNs.Thomas Schwinge2013-03-152-18/+19
|
* Add one test, removed a duplicated one, add a few comments about missing tests.Thomas Schwinge2013-03-151-1/+15
|
* Better distinguish between NaN/qNaN/sNaN.Thomas Schwinge2013-03-155-600/+600
|
* Enable tests for x86_64, too, which currently are enabled only for x86.Thomas Schwinge2013-03-152-2/+2
|
* Fix copy'n'pastos.Thomas Schwinge2013-03-151-2/+2
|
* Fix spurious underflow exceptions for Bessel functions for double (bug 14155).Joseph Myers2013-03-141-4/+2
|
* Fix some testsuite build warning fixes in libmSiddhesh Poyarekar2013-02-193-19/+22
|
* Remove bounded-pointers build system support.Joseph Myers2013-02-151-3/+0
|
* Remove bp-sym.h and BP_SYM uses from C code.Joseph Myers2013-02-141-3/+2
|
* Fix casinh spurious underflows away from [-i,i] (bug 15062).Joseph Myers2013-01-314-0/+147
|
* Fix cacos real-part inaccuracy for result real part near 0 (bug 15023).Joseph Myers2013-01-1711-128/+366
|
* Add 64-bit VIS3 optimized GMP routines for sparc.David S. Miller2013-01-111-1/+2
| | | | | | | | | | | | | | | | * math/Makefile: Recognize gmp-sysdep_routines. * sysdeps/sparc/sparc64/multiarch/Makefile: Add VIS3 optimized GMP routines to sysdeps. * sysdeps/sparc/sparc64/multiarch/add_n-vis3.S: New file. * sysdeps/sparc/sparc64/multiarch/add_n.S: New file. * sysdeps/sparc/sparc64/multiarch/addmul_1-vis3.S: New file. * sysdeps/sparc/sparc64/multiarch/addmul_1.S: New file. * sysdeps/sparc/sparc64/multiarch/mul_1-vis3.S: New file. * sysdeps/sparc/sparc64/multiarch/mul_1.S: New file. * sysdeps/sparc/sparc64/multiarch/sub_n-vis3.S: New file. * sysdeps/sparc/sparc64/multiarch/sub_n.S: New file. * sysdeps/sparc/sparc64/multiarch/submul_1-vis3.S: New file. * sysdeps/sparc/sparc64/multiarch/submul_1.S: New file.
* Use __extension__ with long long in installed headers.Joseph Myers2013-01-101-0/+2
|
* Revert "CFLAGS-test-tgmath2.c"Andreas Schwab2013-01-101-1/+1
| | | | This reverts commit 3167bfc62bb38e3057f7694566b5bb157236a5a8.
* CFLAGS-test-tgmath2.cAndreas Schwab2013-01-101-1/+1
|
* Fix casinh, casin overflow (bug 14996).Joseph Myers2013-01-074-20/+85
|
* Fix casinh, casin inaccuracy from cancellation (bug 14994).Joseph Myers2013-01-044-18/+88
|
* Update copyright notices with scripts/update-copyrights.Joseph Myers2013-01-02192-195/+192
|
* math: use existing nonnull attribute defineMike Frysinger2012-12-301-2/+1
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Fix powl inaccuracy for x86_64 and x86 (bug 13881).Joseph Myers2012-11-281-4/+31
|
* Disable some fma tests for ldbl-128ibm.Joseph Myers2012-11-221-0/+6
|
* Fix ldbl-128ibm atanl spurious underflows (bug 14871).Joseph Myers2012-11-221-0/+8
|
* Fix ldbl-128ibm hypotl internal underflows (bug 14869).Joseph Myers2012-11-221-0/+3
|
* Fix ldbl-128ibm hypotl inaccuracy for arguments with large ratio (bug 14868).Joseph Myers2012-11-221-0/+2
|
* Mark some clog / clog10 underflows as expected for IBM long double.Joseph Myers2012-11-221-4/+4
|
* Fix spurious underflows in ldbl-128 atan implementation.David S. Miller2012-11-191-0/+5
| | | | | | | | | | With help from Joseph Myers. * sysdeps/ieee754/ldbl-128/s_atanl.c (__atanl): Handle tiny and very large arguments properly. * math/libm-test.inc (atan_test): New tests. (atan2_test): New tests. * sysdeps/sparc/fpu/libm-test-ulps: Update. * sysdeps/x86_64/fpu/libm-test-ulps: Update.
* Correct tinyness handling in long-double and float y0/y1.David S. Miller2012-11-181-0/+24
| | | | | | | | | | | | | | | | | With help from Joseph Myers. * sysdeps/ieee754/flt-32/e_j0f.c (__ieee754_y0f): Adjust tinyness cutoff to 2**-13. * sysdeps/ieee754/flt-32/e_j1f.c (__ieee754_y1f): Adjust tinyness cutoff to 2**-25. * sysdeps/ieee754/ldbl-128/e_j0l.c (U0): New constant. ( __ieee754_y0l): Avoid arithmetic underflow when 'x' is very small. * sysdeps/ieee754/ldbl-128/e_j1l.c (__ieee754_y1l): Likewise. * math/libm-test.inc (y0_test): New tests. (y1_test): New tests. * sysdeps/i386/fpu/libm-test-ulps: Update. * sysdeps/x86_64/fpu/libm-test-ulps: Update. * sysdeps/sparc/fpu/libm-test-ulps: Update.
* Fix buffer overflow in libm-test.inc check_complex()Marcus Shawcroft2012-11-151-3/+9
|
* Fix spurious underflows from pow with results close to 1 (bug 14811).Joseph Myers2012-11-071-0/+29
|