aboutsummaryrefslogtreecommitdiff
path: root/math
AgeCommit message (Collapse)Author
2013-04-24Add catan, catanh tests at +/- 1 and +/- i.Joseph Myers
2013-04-24Use suffixed floating-point constants in float and long double catan/catanh.Joseph Myers
2013-04-24Fix catan, catanh inaccuracy through use of log (bug 15394).Joseph Myers
2013-04-11libm-test.inc: Fix tests where cos(PI/2) != 0.Carlos O'Donell
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.
2013-04-11Don't use run-via-rtld-prefix for anything other than testsSiddhesh Poyarekar
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.
2013-04-06README.libm-test: Use testrun.sh to run libm test.Carlos O'Donell
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.
2013-04-06New Makefile target `regen-ulps'.Carlos O'Donell
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"?'
2013-04-05[BZ #14686, #15336] Fix standard compliance. Don't use hard-coded qNaN values.Thomas Schwinge
2013-04-03Fix missing underflow from cexp (bug 14478).Joseph Myers
2013-04-02Fix cacosh inaccuracy and spurious exceptions (bug 15327).Joseph Myers
2013-04-02New <math.h> macro named issignaling to check for a signaling NaN (sNaN).Thomas Schwinge
It is based on draft TS 18661 and currently enabled as a GNU extension.
2013-03-30Fix casinh inaccuracy for imaginary part < 1.0, real part small (bug 10357).Joseph Myers
2013-03-27Fix casinh inaccuracy near i, imaginary part > 1 (bug 15307).Joseph Myers
2013-03-22BZ#13889: expl (709.75) wrongly overflows for ldbl-128ibmAdhemerval Zanella
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.
2013-03-21libm-test: Properly wrap blocks consisting of several statements.Thomas Schwinge
2013-03-21On 32-bit x86, disable certain tests involving sNaN values.Thomas Schwinge
Follow-up to commit 495ded2c8c1eb8c0ac4b54add2dd397852e19cba.
2013-03-21Fix Bessel function spurious overflows for ldbl-128 / ldbl-128ibm (bug 15285).Joseph Myers
2013-03-21Fix casinh inaccuracy for argument with imaginary part 1 (bug 15287).Joseph Myers
2013-03-19Fix types of constants in k_casinh*.c.Joseph Myers
2013-03-16Fix y1l spurious overflows for ldbl-96 (bug 15283).Joseph Myers
2013-03-16Fix spurious underflow exceptions for Bessel functions for ldbl-128 / ↵Joseph Myers
ldbl-128ibm (bug 14155).
2013-03-16Move "-sNaN" value into a separate variable.Thomas Schwinge
2013-03-15 * math/libm-test.inc (ldexp_test): Add missing START/END markers.Thomas Schwinge
2013-03-15Promote a math test for sNaN handling to the top-level.Thomas Schwinge
2013-03-15Use GCC's builtins for generating NaNs.Thomas Schwinge
2013-03-15Add one test, removed a duplicated one, add a few comments about missing tests.Thomas Schwinge
2013-03-15Better distinguish between NaN/qNaN/sNaN.Thomas Schwinge
2013-03-15Enable tests for x86_64, too, which currently are enabled only for x86.Thomas Schwinge
2013-03-15Fix copy'n'pastos.Thomas Schwinge
2013-03-14Fix spurious underflow exceptions for Bessel functions for double (bug 14155).Joseph Myers
2013-02-19Fix some testsuite build warning fixes in libmSiddhesh Poyarekar
2013-02-15Remove bounded-pointers build system support.Joseph Myers
2013-02-14Remove bp-sym.h and BP_SYM uses from C code.Joseph Myers
2013-01-31Fix casinh spurious underflows away from [-i,i] (bug 15062).Joseph Myers
2013-01-17Fix cacos real-part inaccuracy for result real part near 0 (bug 15023).Joseph Myers
2013-01-11Add 64-bit VIS3 optimized GMP routines for sparc.David S. Miller
* 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.
2013-01-10Use __extension__ with long long in installed headers.Joseph Myers
2013-01-10Revert "CFLAGS-test-tgmath2.c"Andreas Schwab
This reverts commit 3167bfc62bb38e3057f7694566b5bb157236a5a8.
2013-01-10CFLAGS-test-tgmath2.cAndreas Schwab
2013-01-07Fix casinh, casin overflow (bug 14996).Joseph Myers
2013-01-04Fix casinh, casin inaccuracy from cancellation (bug 14994).Joseph Myers
2013-01-02Update copyright notices with scripts/update-copyrights.Joseph Myers
2012-12-30math: use existing nonnull attribute defineMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-11-28Fix powl inaccuracy for x86_64 and x86 (bug 13881).Joseph Myers
2012-11-22Disable some fma tests for ldbl-128ibm.Joseph Myers
2012-11-22Fix ldbl-128ibm atanl spurious underflows (bug 14871).Joseph Myers
2012-11-22Fix ldbl-128ibm hypotl internal underflows (bug 14869).Joseph Myers
2012-11-22Fix ldbl-128ibm hypotl inaccuracy for arguments with large ratio (bug 14868).Joseph Myers
2012-11-22Mark some clog / clog10 underflows as expected for IBM long double.Joseph Myers
2012-11-19Fix spurious underflows in ldbl-128 atan implementation.David S. Miller
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.