about summary refs log tree commit diff
path: root/sysdeps/ieee754/ldbl-128
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix nextafter overflow in non-default rounding modes (bug 16677).Joseph Myers2014-03-111-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ISO C requires the result of nextafter to be independent of the rounding mode, even when underflow or overflow occurs. This patch fixes the bug in various nextafter implementations that, having done an overflowing computation to force an overflow exception (correct), they then return the result of that computation rather than an infinity computed some other way (incorrect, when the overflowing result of arithmetic with that sign and rounding mode is finite but the correct result is infinite) - generally by falling through to existing code to return a value that in fact is correct for this case (but was computed by an integer increment and so without generating the exceptions required). Having fixed the bug, the previously deferred conversion of nextafter testing in libm-test.inc to ALL_RM_TEST is also included. Tested x86_64 and x86; also spot-checked results of nextafter tests for powerpc32 and mips64 to test the ldbl-128ibm and ldbl-128 changes. (The m68k change is untested.) [BZ #16677] * math/s_nextafter.c (__nextafter): Do not return value from overflowing computation. * sysdeps/i386/fpu/s_nextafterl.c (__nextafterl): Likewise. * sysdeps/ieee754/flt-32/s_nextafterf.c (__nextafterf): Likewise. * sysdeps/ieee754/ldbl-128/s_nextafterl.c (__nextafterl): Likewise. * sysdeps/ieee754/ldbl-128ibm/s_nextafterl.c (__nextafterl): Likewise. * sysdeps/m68k/m680x0/fpu/s_nextafterl.c (__nextafterl): Likewise. * math/libm-test.inc (nextafter_test): Use ALL_RM_TEST.
* BZ #16447: Fix ldbl-128 expl implementation.Andreas Krebbel2014-02-111-1/+1
| | | | | Extend the range of numbers handled via unsafe mode. Add expl testcase and regenerate ULPs for s390.
* Use glibc_likely instead __builtin_expect.Ondřej Bílka2014-02-101-3/+3
|
* [BZ #16427] Fix ldbl-128 exp overflows.Andreas Krebbel2014-01-151-13/+5
| | | | | Invoke the non-IEEE handling only for numbers special also in the IEEE case. This aligns the exp handling with the other ldbl variants.
* Fix ldbl-128 / ldbl-128ibm lgammal spurious underflow (bug 16400).Joseph Myers2014-01-061-1/+3
| | | | | | | | | | | | | | This patch fixes bug 16400, spurious underflow exceptions for ldbl-128 / ldbl-128ibm lgammal with small positive arguments, by just using -__logl (x) as the result in the problem cases (similar to the previous fix for problems with small negative arguments). Tested powerpc32, and also tested on mips64 that this does not require ulps regeneration for the ldbl-128 case. * sysdeps/ieee754/ldbl-128/e_lgammal_r.c (__ieee754_lgammal_r): Return -__logl (x) for small positive arguments without evaluating a polynomial.
* Update copyright notices with scripts/update-copyrightsAllan McRae2014-01-0129-29/+29
|
* Fix ldbl-128 lgammal for small negative arguments (bug 16337).Joseph Myers2013-12-221-2/+2
| | | | | | | | | | | | | | | | | | | | | This patch fixes bug 16337, ldbl-128 lgammal spurious overflows for small negative arguments (the arguments in question are already in the testsuite). The implementation uses the reflection formula to compute lgamma of negative x from lgamma of -x, effectively resulting in a calculation -log(x^2) + log(-x); cancellation isn't problematic in this case (bugs for problematic cancellation in lgamma are 2542, 2543, 2558), but the x^2 calculation can underflow (in which case there is spurious logic to return an overflowing value - lgamma can only ever correctly overflow for large positive arguments, though tgamma can overflow for small arguments of either sign as well as large positive arguments). The fix is simply to calculate the result directly with logl when the argument is a small enough negative number. Tested mips64. * sysdeps/ieee754/ldbl-128/e_lgammal_r.c (__ieee754_lgammal_r): Calculate results for small negative arguments directly rather than using reflection formula with special underflow handling.
* Fix ldbl-128 logl for subnormals (bug 16338).Joseph Myers2013-12-181-3/+2
| | | | | | | | | | | | | | | | | | | | | | 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.
* Fix hypot handling of subnormals (bug 16316, bug 16330).Joseph Myers2013-12-171-0/+11
|
* Fix Bessel function error handling (bug 6807, bug 15901).Joseph Myers2013-12-041-1/+1
|
* Fix erfc errno setting on underflow (bug 6786).Joseph Myers2013-12-031-2/+11
|
* PowerPC floating point little-endian [1 of 15]Alan Modra2013-10-041-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | 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 typos.Ondřej Bílka2013-08-301-1/+1
|
* [BZ #15522] strtod ("nan(N)") returning a sNaN in some casesThomas Schwinge2013-08-291-5/+7
|
* Fix leading whitespaces.Ondrej Bilka2013-06-069-9/+9
|
* Remove trailing whitespace.Joseph Myers2013-06-0512-172/+172
|
* Fix nearbyint scheduling of arithmetic past fesetenv (bug 15490).Joseph Myers2013-05-191-0/+2
|
* Fix ldbl-128 cos range reduction near pi/2 (bug 15429).Joseph Myers2013-05-091-5/+5
|
* Improve tgamma accuracy (bugs 2546, 2560, 5159, 15426).Joseph Myers2013-05-082-5/+215
|
* New <math.h> macro named issignaling to check for a signaling NaN (sNaN).Thomas Schwinge2013-04-021-0/+45
| | | | It is based on draft TS 18661 and currently enabled as a GNU extension.
* Fix Bessel function spurious overflows for ldbl-128 / ldbl-128ibm (bug 15285).Joseph Myers2013-03-212-20/+34
|
* Fix spurious underflow exceptions for Bessel functions for ldbl-128 / ↵Joseph Myers2013-03-162-58/+79
| | | | ldbl-128ibm (bug 14155).
* Update copyright notices with scripts/update-copyrights.Joseph Myers2013-01-0227-27/+27
|
* Add script to update copyright notices and reformat some to facilitate its use.Joseph Myers2013-01-012-4/+2
|
* Fix set-but-not-used warnings in ldbl-128 nearbyintl, rintl.Joseph Myers2012-11-202-2/+2
|
* Fix spurious underflows in ldbl-128 atan implementation.David S. Miller2012-11-191-0/+17
| | | | | | | | | | 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-182-0/+5
| | | | | | | | | | | | | | | | | 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 BZ #14811 for ldbl-128 too.David S. Miller2012-11-161-1/+5
| | | | | | | [BZ #14811] * sysdeps/ieee754/ldbl-128/e_powl.c (__ieee754_powl): Saturate nonzero exponents with absolute value below 0x1p-128 to +/- 0x1p-128.
* Don't generate underflow for very small values in log1pl.David S. Miller2012-11-161-0/+6
| | | | | * sysdeps/ieee754/ldbl-128/s_log1pl.c (__log1pl): If xm1 is smaller than LDBL_EPSILON/2.0L, just return xm1.
* Fix fma underflows with small x * y (bug 14793).Joseph Myers2012-11-061-18/+27
|
* Fix fma overflow results outside round-to-nearest mode (bug 14797).Joseph Myers2012-11-041-4/+6
|
* Make fma use of Dekker and Knuth algorithms use round-to-nearest (bug 14796).Joseph Myers2012-11-031-2/+16
|
* Fix fma (a, b, c) for small a * b (bugs 14784, 14785).Joseph Myers2012-11-011-4/+34
|
* Fix fma underflow exceptions in after-rounding edge cases.Joseph Myers2012-10-311-0/+12
|
* Fix fma missing underflows and bad results for some subnormal results (bugs ↵Joseph Myers2012-10-301-14/+8
| | | | 14152, 14783).
* Fix sign of inexact zero return from fma (bug 14645).Joseph Myers2012-10-011-0/+5
|
* Fix sign of exact zero return from fma (bug 14638).Joseph Myers2012-09-292-1/+12
|
* Remove sysdeps/ieee754/ldbl-128/bits/huge_vall.h and let buildsSteve Ellcey2012-09-271-50/+0
| | | | | use bits/huge_vall.h instead. There is no longer any need for the special huge_vall.h file.
* Fix inaccuracy of clog, clog10 near |z| = 1 (bug 13629).Joseph Myers2012-09-251-0/+111
|
* Set up errno properly for yn.Marek Polacek2012-07-251-0/+4
|
* Ensure additions are not scheduled after fetestexcept in fmaf and fmal.Joseph Myers2012-06-011-2/+3
|
* Optimize handling of denormals in logb/logbf/logblAndreas Schwab2012-05-261-4/+6
|
* Fix for logb/logbf/logbl (bugs 13954/13955/13956)Adhemerval Zanella2012-05-101-10/+21
| | | | | | | | POSIX 2008 states that if the input for 'logb[f|l]' is a subnormal number it should be treated as if it were normalized. This means the implementation should calculate the log2 of the mantissa and add it to the subnormal exponent (-126 for float and -1022 for double and IBM long double). This patch takes care of that.
* Fix exp10 inaccuracy and exceptions (bugs 13884, 13914).Joseph Myers2012-05-061-0/+47
|
* Fix nexttoward bugs (bugs 2550, 2570).Joseph Myers2012-05-012-16/+4
|
* Finish ilogb changesAndreas Jaeger2012-04-181-2/+1
| | | | | | | | | | | | | | | | | | [BZ# 6794] * sysdeps/ieee754/ldbl-96/s_ilogbl.c: Moved to ... * sysdeps/ieee754/ldbl-96/e_ilogbl.c: ... here. Rename __ilogbl to __ieee754_ilogbl and remove weak_alias. * sysdeps/ieee754/ldbl-128/s_ilogbl.c: Moved to ... * sysdeps/ieee754/ldbl-128/e_ilogbl.c: ... here. Rename __ilogbl to __ieee754_ilogbl and remove weak_alias. * sysdeps/ieee754/ldbl-64-128/s_ilogbl.c: Moved to ... * sysdeps/ieee754/ldbl-64-128/e_ilogbl.c: ... here. * sysdeps/sparc/sparc64/soft-fp/s_ilogbl.c: Moved to ... * sysdeps/sparc/sparc64/soft-fp/e_ilogbl.c: ... here. Rename __ilogbl to __ieee754_ilogbl and remove weak_alias.
* Avoid overflows from long double functions using __kernel_standard.Joseph Myers2012-03-281-2/+2
|
* Fix low-part sign handling in sin/cos for ldbl-128 and ldbl-128ibm.Joseph Myers2012-03-223-3/+11
|
* Fix generic ldbl-128 expm1l just like x86-64 and i386 variants were.David S. Miller2012-03-131-0/+5
| | | | | * sysdeps/ieee754/ldbl-128/s_expm1l.c (__expm1l): Use expl for large parameters.
* Use <> for math.h and math_private.h everywhere.Richard Henderson2012-03-0963-112/+112
| | | | Entire tree edited via find | grep | sed.