Adhemerval Zanella
9ea01d93f7
Log2 and log10 for wordsize-64.
...
This patch also fixes indentation on default dbl-64 code.
2012-05-15 16:34:41 -03:00
H.J. Lu
c044d724dc
Use __builtin_clzll on int64 in __logb
2012-05-14 05:04:11 -07:00
Adhemerval Zanella
89c9aa491a
Fix for logb/logbf/logbl (bugs 13954/13955/13956)
...
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-10 15:11:55 -05:00
Joseph Myers
d8b82cad1b
Fix exp10 inaccuracy and exceptions (bugs 13884, 13914).
2012-05-06 18:23:44 +00:00
Joseph Myers
41498f4db1
Fix missing exceptions from exp (bugs 13787, 13922, 14036).
2012-05-05 19:37:39 +00:00
Adhemerval Zanella
31dc8730af
Fix for ldbl-128ibm acosl/asinl inaccuracies
...
2012-05-02 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
* sysdeps/ieee754/ldbl-128ibm/e_acosl.c (__ieee754_acosl): Fix
long double comparison inaccuracies.
* sysdeps/ieee754/ldbl-128ibm/e_asinl.c (__ieee754_asinl):
* Likewise.
* sysdeps/powerpc/fpu/libm-test-ulps: Update.
2012-05-04 13:06:32 +02:00
Adhemerval Zanella
4f9d04aa8f
Fix nexttoward bugs
...
[BZ #2550 ]
[BZ #2570 ]
* sysdeps/ieee754/ldbl-128ibm/s_nexttoward.c: Use floating-point
comparisons to determine direction to adjust input.
2012-05-02 15:14:17 +02:00
Joseph Myers
7cb029ee6e
Fix nexttoward bugs (bugs 2550, 2570).
2012-05-01 15:37:43 +00:00
Andreas Schwab
7e0d315da8
Fix formatting of denormal IBM long double numbers
2012-04-28 22:21:27 +02:00
Adhemerval Zanella
0ac229c819
Fix ctan, ctanh overflow for ldbl-128ibm (bug 11521).
2012-04-26 11:18:11 -05:00
Andreas Jaeger
7a99a61461
Finish ilogb changes
...
[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-04-18 14:31:43 +02:00
Andreas Schwab
fb5e92c979
Remove useless __ilogb*_finite aliases
2012-04-18 00:40:13 +02:00
Adhemerval Zanella
76da726532
Fix ilogb exception and errno (bug 6794)
...
[BZ #6794 ]
Following Joseph comments about bug 6794, here is a proposed fix. It turned out
to be a large fix mainly because I had to move some file along to follow libm
files/names conventions.
Basically I have added wrappers (w_ilogb.c, w_ilogbf.c, w_ilogbl.c) that now calls
the symbol '__ieee754_ilogb'. The wrappers checks for '__ieee754_ilogb' output and
set the errno and raise exceptions as expected.
The '__ieee754_ilogb' is implemented in sysdeps. I have moved the 's_ilogb[f|l]' files
to e_ilogb[f|l] and renamed the '__ilogb[f|l]' to '__ieee754_ilogb[f|l]'.
I also found out a bug in i386 and x86-64 assembly coded ilogb implementation where
it raises a FE_DIVBYZERO when argument is '0.0'. I corrected this issue as well.
Finally I added the errno and FE_INVALID tests for 0.0, NaN and +-InF argument. Tested
on i386, x86-64, ppc32 and ppc64.
2012-04-17 22:12:53 +02:00
Joseph Myers
d7dd945398
Fix missing overflow exceptions from pow (bug 13873).
2012-04-09 09:43:18 +00:00
Aurelien Jarno
f77f123206
Use __kernel_standard instead of __kernel_standard_f in exp wrapper (bug 13705).
2012-04-08 22:45:13 +00:00
Joseph Myers
d6270972f7
Fix pow of negative numbers to integer exponents (bugs 369, 2678, 3866).
2012-03-28 14:57:58 +00:00
Joseph Myers
41bf21a1e7
Avoid overflows from long double functions using __kernel_standard.
2012-03-28 09:32:12 +00:00
Andreas Schwab
a3f61311c0
Fix undue underflow in ldbl-128ibm version of expl
2012-03-26 14:19:35 +02:00
Joseph Myers
c0df8e693f
Fix low-part sign handling in sin/cos for ldbl-128 and ldbl-128ibm.
2012-03-22 12:52:50 +00:00
Andreas Schwab
dcb3398838
Fix missing overflow/underflow exception in ldbl-128ibm version of powl
2012-03-21 23:59:22 +01:00
Andreas Schwab
7998fa7899
Disable use of FMA instructions in branred
2012-03-21 23:58:50 +01:00
Joseph Myers
2460d3aa21
Fix pow of zero and infinity to large powers.
2012-03-21 12:16:00 +00:00
Joseph Myers
7726d6a95d
Fix atan2 spurious exceptions (bug 11451).
2012-03-19 20:11:09 +00:00
Richard Henderson
0fe0f1f86f
Create and use libc_feupdateenv_test.
...
We can reduce the number of STMXCSR, and often we can avoid the
call to __feraiseexcept.
2012-03-19 06:50:41 -07:00
Richard Henderson
eb92c487b3
Create and use SET_RESTORE_ROUND{,_NOEX,_53BIT}{,F,L}.
2012-03-19 06:49:44 -07:00
Richard Henderson
4851a949b4
Make inline __isnan, __isinf_ns, __finite generic.
...
For code generation to stay identical on x86_64, this requires that
we define the fp word manipulation macros before including the
generic header.
2012-03-19 06:47:43 -07:00
H.J. Lu
eb0f39b6b7
Make lround the alias of llround for wordsize-64
2012-03-16 15:20:45 -07:00
Joseph Myers
11b90b9f50
Fix tan, tanl for large inputs.
2012-03-16 20:05:37 +00:00
Joseph Myers
96cbe7f482
Include program generating __sincosl_table in comment.
2012-03-16 15:18:19 +00:00
Joseph Myers
8848d99dce
Implement ldbl-96 sinl / cosl / sincosl (bug 13851).
2012-03-16 12:30:05 +00:00
Andreas Jaeger
c4814b6b3a
Implement and use libc_feholdexcept_setround_53bit and libc_feupdateenv_53bit
...
so that double arithmetic in s_sin is done in 53 bit (without extend i386 double precision)
2012-03-14 17:20:10 +01:00
David S. Miller
7c10fd3515
Fix hypotf overflow/underflow by using double precision instead of scaling.
...
[BZ #13840 ]
* sysdeps/ieee754/flt-32/e_hypotf.c (__ieee754_hypotf): Rewrite to use
double-precision for the calculation instead of scaling.
2012-03-13 18:08:58 -07:00
Joseph Myers
f453b98b6b
Clean up dbl-64 rint, nearbyint.
2012-03-13 14:12:44 +00:00
David S. Miller
2a8ab7f265
Fix generic ldbl-128 expm1l just like x86-64 and i386 variants were.
...
* sysdeps/ieee754/ldbl-128/s_expm1l.c (__expm1l): Use expl for
large parameters.
2012-03-13 01:18:55 -07:00
Richard Henderson
1ed0291c31
Use <> for math.h and math_private.h everywhere.
...
Entire tree edited via find | grep | sed.
2012-03-09 16:09:10 -08:00
Richard Henderson
38842f4553
Use target-specific math_private.h in math_ldbl_opt.h.
2012-03-09 08:08:11 -08:00
Marek Polacek
a53b7a4e4b
Fix up long double fphex.
2012-03-06 22:08:16 +01:00
Andreas Schwab
bbb78d030e
Fix loss of precision in cosh and sinh for IBM long double
2012-03-05 20:38:17 +01:00
Joseph Myers
b7cd39e8f8
Fix pow in non-default rounding modes (bug 3976).
2012-03-05 12:22:46 +00:00
Joseph Myers
804360ed83
Fix sin, cos, tan in non-default rounding modes (bug 3976).
2012-03-02 20:51:39 +00:00
Joseph Myers
a6d06d7b86
Fix scalbn, scalbln integer overflow.
2012-03-02 15:32:56 +00:00
Joseph Myers
28afd92dbd
Fix exp in non-default rounding modes (bug 3976).
2012-03-02 15:12:53 +00:00
Joseph Myers
7b1902cb3e
Improve erfc accuracy.
2012-03-01 21:15:38 +00:00
David S. Miller
a78bc6549c
Fix ldbl-128 rintl/nearbyintl just like flt-32 variants.
...
* 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-27 14:51:45 -08:00
Andreas Schwab
c20105c398
Replace sysdeps/ieee754/dbl-64/k_tan.c with empty file
2012-02-26 16:10:46 +01:00
Joseph Myers
6cbeae4719
Fix nearbyintf rounding.
2012-02-22 13:03:40 +00:00
Joseph Myers
fe45ce09f3
Fix rintf rounding.
2012-02-22 13:01:20 +00:00
Aurelien Jarno
92221550d7
Use non-signaling floating-point comparisons in math functions.
2012-02-19 11:20:18 +01:00
Paul Eggert
59ba27a63a
Replace FSF snail mail address with URLs.
2012-02-09 23:18:22 +00:00
Joseph Myers
8db2188281
Remove __STDC__ conditionals from libm.
2012-01-27 17:29:45 +00:00