summaryrefslogtreecommitdiff
path: root/sysdeps/ieee754/ldbl-128
AgeCommit message (Collapse)AuthorFilesLines
2014-01-15[BZ #16427] Fix ldbl-128 exp overflows.Andreas Krebbel1-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.
2014-01-06Fix ldbl-128 / ldbl-128ibm lgammal spurious underflow (bug 16400).Joseph Myers1-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.
2014-01-01Update copyright notices with scripts/update-copyrightsAllan McRae29-29/+29
2013-12-22Fix ldbl-128 lgammal for small negative arguments (bug 16337).Joseph Myers1-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.
2013-12-18Fix ldbl-128 logl for subnormals (bug 16338).Joseph Myers1-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.
2013-12-17Fix hypot handling of subnormals (bug 16316, bug 16330).Joseph Myers1-0/+11
2013-12-04Fix Bessel function error handling (bug 6807, bug 15901).Joseph Myers1-1/+1
2013-12-03Fix erfc errno setting on underflow (bug 6786).Joseph Myers1-2/+11
2013-10-04PowerPC floating point little-endian [1 of 15]Alan Modra1-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.
2013-08-30Fix typos.Ondřej Bílka1-1/+1
2013-08-29[BZ #15522] strtod ("nan(N)") returning a sNaN in some casesThomas Schwinge1-5/+7
2013-06-06Fix leading whitespaces.Ondrej Bilka9-9/+9
2013-06-05Remove trailing whitespace.Joseph Myers12-172/+172
2013-05-19Fix nearbyint scheduling of arithmetic past fesetenv (bug 15490).Joseph Myers1-0/+2
2013-05-09Fix ldbl-128 cos range reduction near pi/2 (bug 15429).Joseph Myers1-5/+5
2013-05-08Improve tgamma accuracy (bugs 2546, 2560, 5159, 15426).Joseph Myers2-5/+215
2013-04-02New <math.h> macro named issignaling to check for a signaling NaN (sNaN).Thomas Schwinge1-0/+45
It is based on draft TS 18661 and currently enabled as a GNU extension.
2013-03-21Fix Bessel function spurious overflows for ldbl-128 / ldbl-128ibm (bug 15285).Joseph Myers2-20/+34
2013-03-16Fix spurious underflow exceptions for Bessel functions for ldbl-128 / ↵Joseph Myers2-58/+79
ldbl-128ibm (bug 14155).
2013-01-02Update copyright notices with scripts/update-copyrights.Joseph Myers27-27/+27
2013-01-01Add script to update copyright notices and reformat some to facilitate its use.Joseph Myers2-4/+2
2012-11-20Fix set-but-not-used warnings in ldbl-128 nearbyintl, rintl.Joseph Myers2-2/+2
2012-11-19Fix spurious underflows in ldbl-128 atan implementation.David S. Miller1-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.
2012-11-18Correct tinyness handling in long-double and float y0/y1.David S. Miller2-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.
2012-11-16Fix BZ #14811 for ldbl-128 too.David S. Miller1-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.
2012-11-16Don't generate underflow for very small values in log1pl.David S. Miller1-0/+6
* sysdeps/ieee754/ldbl-128/s_log1pl.c (__log1pl): If xm1 is smaller than LDBL_EPSILON/2.0L, just return xm1.
2012-11-06Fix fma underflows with small x * y (bug 14793).Joseph Myers1-18/+27
2012-11-04Fix fma overflow results outside round-to-nearest mode (bug 14797).Joseph Myers1-4/+6
2012-11-03Make fma use of Dekker and Knuth algorithms use round-to-nearest (bug 14796).Joseph Myers1-2/+16
2012-11-01Fix fma (a, b, c) for small a * b (bugs 14784, 14785).Joseph Myers1-4/+34
2012-10-31Fix fma underflow exceptions in after-rounding edge cases.Joseph Myers1-0/+12
2012-10-30Fix fma missing underflows and bad results for some subnormal results (bugs ↵Joseph Myers1-14/+8
14152, 14783).
2012-10-01Fix sign of inexact zero return from fma (bug 14645).Joseph Myers1-0/+5
2012-09-29Fix sign of exact zero return from fma (bug 14638).Joseph Myers2-1/+12
2012-09-27Remove sysdeps/ieee754/ldbl-128/bits/huge_vall.h and let buildsSteve Ellcey1-50/+0
use bits/huge_vall.h instead. There is no longer any need for the special huge_vall.h file.
2012-09-25Fix inaccuracy of clog, clog10 near |z| = 1 (bug 13629).Joseph Myers1-0/+111
2012-07-25Set up errno properly for yn.Marek Polacek1-0/+4
2012-06-01Ensure additions are not scheduled after fetestexcept in fmaf and fmal.Joseph Myers1-2/+3
2012-05-26Optimize handling of denormals in logb/logbf/logblAndreas Schwab1-4/+6
2012-05-10Fix for logb/logbf/logbl (bugs 13954/13955/13956)Adhemerval Zanella1-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.
2012-05-06Fix exp10 inaccuracy and exceptions (bugs 13884, 13914).Joseph Myers1-0/+47
2012-05-01Fix nexttoward bugs (bugs 2550, 2570).Joseph Myers2-16/+4
2012-04-18Finish ilogb changesAndreas Jaeger1-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.
2012-03-28Avoid overflows from long double functions using __kernel_standard.Joseph Myers1-2/+2
2012-03-22Fix low-part sign handling in sin/cos for ldbl-128 and ldbl-128ibm.Joseph Myers3-3/+11
2012-03-13Fix generic ldbl-128 expm1l just like x86-64 and i386 variants were.David S. Miller1-0/+5
* sysdeps/ieee754/ldbl-128/s_expm1l.c (__expm1l): Use expl for large parameters.
2012-03-09Use <> for math.h and math_private.h everywhere.Richard Henderson63-112/+112
Entire tree edited via find | grep | sed.
2012-03-02Fix scalbn, scalbln integer overflow.Joseph Myers2-6/+10
2012-02-27Fix ldbl-128 rintl/nearbyintl just like flt-32 variants.David S. Miller2-44/+6
* sysdeps/ieee754/ldbl-128/s_nearbyintl.c (__nearbyintl): Do not manipulate bits before adding and subtracting TWO112[sx]. * sysdeps/ieee754/ldbl-128/s_rintl.c (__rintl): Likewise.
2012-02-09Replace FSF snail mail address with URLs.Paul Eggert44-115/+86