Commit Graph

370 Commits

Author SHA1 Message Date
Joseph Myers
10285c2113 Fix pow (0.0, -Inf) (bug 14241). 2012-06-15 11:27:51 +00:00
Adhemerval Zanella
1b671feb61 Fix for wrong ldbl128-ibm fmodl commit 2012-06-05 21:33:23 -03:00
Adhemerval Zanella
6043738b36 Fix spurious undeflow for ldbl-128ibm erfl
For values higher than 25.6283 erflc underflow, so adjust erfl
to return a constant value based argument sign.
2012-06-05 10:42:49 -03:00
Adhemerval Zanella
34ae0b3270 Fix ldbl128ibm fmodl for subnormals. 2012-06-05 10:16:49 -03:00
Joseph Myers
c5bfe3d5ba Fix fmod for subnormals (bug 14048). 2012-06-01 19:05:46 +00:00
Joseph Myers
4842e4fe5f Ensure additions are not scheduled after fetestexcept in fmaf and fmal. 2012-06-01 19:02:21 +00:00
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
Joseph Myers
b65504975c Fix acosf underflow (bug 14153). 2012-05-25 11:07:07 +00:00
Andreas Schwab
d18ea0c5e6 Remove use of INTDEF/INTUSE in libio 2012-05-24 23:06:20 +02:00
Andreas Schwab
5bd66283db Track dependencies for .oS-only objects 2012-05-16 18:47:38 +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
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