Aurelien Jarno
efb734887e
Add a barrier in the double fma implementation.
2012-06-01 19:01:17 +00:00
Andreas Schwab
25dbcb277a
Optimize handling of denormals in logb/logbf/logbl
2012-05-26 13:53:22 +02:00
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
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
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
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
Joseph Myers
f453b98b6b
Clean up dbl-64 rint, nearbyint.
2012-03-13 14:12:44 +00: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
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
Andreas Schwab
c20105c398
Replace sysdeps/ieee754/dbl-64/k_tan.c with empty file
2012-02-26 16:10:46 +01: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
Ulrich Drepper
0cc5ed3b01
Optimized acosh for 64-bit platforms
2012-01-11 22:01:09 -05:00
Ulrich Drepper
41d0e8696f
Optimize scalbln
2012-01-11 12:49:16 -05:00
Ulrich Drepper
daa891c0e8
Optimize s_modf
2012-01-10 22:26:22 -05:00
Ulrich Drepper
a47a831ad8
Optimize ldexp and scalbn
2012-01-10 20:52:29 -05:00
Ulrich Drepper
d6e97a1da0
Some branch prediction for log1p
2012-01-09 18:59:04 -05:00
Marek Polacek
aaddc98c25
Remove unused variables
2011-11-11 13:27:59 -05:00
Ulrich Drepper
cb95113e30
Fix accuracy problem in generic sin
2011-10-29 14:08:56 -04:00
Andreas Schwab
804791474d
Fix uses of math_force_eval
2011-10-26 11:44:08 +02:00
Ulrich Drepper
e0016b11d6
Add AVX optimized versions for some x86-64 math functions
2011-10-25 21:34:55 -04:00
Ulrich Drepper
d7826aa149
Use math_force_eval in more places
2011-10-25 10:52:45 -04:00
Ulrich Drepper
31d3cc00b0
Cleanup FMA4 patch
...
Move the FMA4 code into its own section. Avoid some of the duplication
of data resulting from the double use of source files.
2011-10-25 00:56:33 -04:00
Ulrich Drepper
af968f62f2
Optimize accurate 64-bit routines for FMA4 on x86-64
2011-10-24 20:19:17 -04:00
Ulrich Drepper
58985aa92f
Finish renamed DLA_FMA -> DLA_FMS
2011-10-24 14:21:18 -04:00
Ulrich Drepper
bb3129bd25
Optimized remquo for 64-bit platforms
2011-10-23 21:31:21 -04:00
Ulrich Drepper
0275fff8a1
Optimize f_mod
...
Branch prediction for the 32-bit implementation and a new optimized
64-bit implementation.
2011-10-23 20:55:26 -04:00
Ulrich Drepper
774a2669af
Clean up FMA use
...
The macro's name should reflect that subtraction is being done. And
use __builtin_fma, it seems to work after all.
2011-10-23 13:31:01 -04:00
Ulrich Drepper
c8b3296bbe
Clean up last dla.h change
2011-10-23 12:50:28 -04:00
Ulrich Drepper
fa36182bda
Improve DLA_FMA for FMA4
2011-10-22 19:53:33 -04:00
Ulrich Drepper
a1a8716924
Start using fma in the libm implementation
2011-10-22 19:02:20 -04:00