Thomas Schwinge
50022a93fc
Respect the user's namespace in installed header files.
...
Fixup for commit c7b275d6b3
.
2013-02-20 18:51:56 +01:00
Thomas Schwinge
c7b275d6b3
bits/nan.h: Change __attribute_used__ to __attribute__ ((unused)).
2013-02-20 16:49:58 +01:00
Siddhesh Poyarekar
20cd7fb3ae
Copy comment about inner loop from powerpc mpa.c to the default one
2013-02-20 18:56:20 +05:30
Siddhesh Poyarekar
22af19f9fb
Don't require LIM to determine loop end in __sqr
2013-02-16 00:15:57 +05:30
Siddhesh Poyarekar
4709fe7602
Use intermediate variable to compute exponent in __mul
2013-02-16 00:09:29 +05:30
Siddhesh Poyarekar
2d0e0f29f8
Fix determination of lower precision in __mul
2013-02-15 23:56:20 +05:30
Siddhesh Poyarekar
f414520d3c
Use __sqr instead of __mul wherever possible
2013-02-14 11:39:14 +05:30
Siddhesh Poyarekar
d6752ccd69
New __sqr function as a faster special case of __mul
2013-02-14 10:31:09 +05:30
Siddhesh Poyarekar
c2af38aa76
Remove unnecessary factorial array
...
kf is n! at the end of the loop, so storing the values is unnecessary.
2013-02-13 17:19:07 +05:30
Siddhesh Poyarekar
4e92d59e26
Better exp polynomial
...
The lesser the __mul calls, the better it is for performance.
2013-02-13 14:49:50 +05:30
Siddhesh Poyarekar
909279a5cf
Optimized mp multiplication
...
Don't bother multiplying zeroes since that only wastes cycles.
2013-02-13 14:16:23 +05:30
Siddhesh Poyarekar
bdf028142e
Clean up add_magnitudes and sub_magnitudes
2013-02-13 13:55:29 +05:30
Roland McGrath
f1d70dad53
Remove lots of inline keywords.
2013-02-07 14:44:18 -08:00
Siddhesh Poyarekar
caa99d06e7
Simplify calculation of 2^-m in __mpexp
2013-01-18 11:18:13 +05:30
Siddhesh Poyarekar
d3b9ea6148
Remove unnecessary multiplication with RADIXI
2013-01-18 11:14:34 +05:30
Siddhesh Poyarekar
a897655d7b
Fix header comment
2013-01-17 15:05:22 +05:30
Siddhesh Poyarekar
f93a8d1569
Consolidate constant defines into mpa.h
2013-01-16 16:06:48 +05:30
Siddhesh Poyarekar
dd930cc571
Fix the value of TWO
2013-01-16 14:53:53 +05:30
David S. Miller
438ebba294
Use libc_fe*() in 32-bit nearbyint()
...
* sysdeps/ieee754/dbl-64/s_nearbyint.c (__nearbyint): Use
libc_feholdexcept and libc_fesetenv.
2013-01-15 20:32:13 -08:00
Siddhesh Poyarekar
2a91b5735a
Minor tweak to mp multiplication
...
Add a local variable to remove extra copies to/from memory in the Z
array.
2013-01-14 21:53:48 +05:30
Siddhesh Poyarekar
1066a53440
Fix code formatting in mpa.c
...
This includes the overridden mpa.c in power4.
2013-01-14 21:53:43 +05:30
Andreas Schwab
557eead076
Revert "Use ieee754/dbl-64/wordsize-64 on powerpc64"
...
This reverts commit 7a9d2c3971
.
2013-01-10 10:44:05 +01:00
Andreas Schwab
d1cdd05138
Revert "sysdeps/ieee754/ldbl-128ibm/e_expl.c"
...
This reverts commit 35eb879e3b
.
2013-01-10 10:44:05 +01:00
Siddhesh Poyarekar
7490eb81ae
Fix formatting in mpexp.c
2013-01-10 14:59:18 +05:30
Siddhesh Poyarekar
751b85f795
Make __mpexp_twomm1 an array of doubles
...
Cleanup to get rid of the `number` muck which is not necessary here.
2013-01-10 14:59:18 +05:30
Andreas Schwab
35eb879e3b
sysdeps/ieee754/ldbl-128ibm/e_expl.c
2013-01-10 09:59:58 +01:00
Andreas Schwab
7a9d2c3971
Use ieee754/dbl-64/wordsize-64 on powerpc64
...
* sysdeps/ieee754/ldbl-opt/wordsize-64/s_ceil.c: New file.
* sysdeps/ieee754/ldbl-opt/wordsize-64/s_finite.c: New file.
* sysdeps/ieee754/ldbl-opt/wordsize-64/s_floor.c: New file.
* sysdeps/ieee754/ldbl-opt/wordsize-64/s_frexp.c: New file.
* sysdeps/ieee754/ldbl-opt/wordsize-64/s_isinf.c: New file.
* sysdeps/ieee754/ldbl-opt/wordsize-64/s_isnan.c: New file.
* sysdeps/ieee754/ldbl-opt/wordsize-64/s_llround.c: New file.
* sysdeps/ieee754/ldbl-opt/wordsize-64/s_logb.c: New file.
* sysdeps/ieee754/ldbl-opt/wordsize-64/s_lround.c: New file.
* sysdeps/ieee754/ldbl-opt/wordsize-64/s_modf.c: New file.
* sysdeps/ieee754/ldbl-opt/wordsize-64/s_nearbyint.c: New file.
* sysdeps/ieee754/ldbl-opt/wordsize-64/s_remquo.c: New file.
* sysdeps/ieee754/ldbl-opt/wordsize-64/s_rint.c: New file.
* sysdeps/ieee754/ldbl-opt/wordsize-64/s_round.c: New file.
* sysdeps/ieee754/ldbl-opt/wordsize-64/s_scalbln.c: New file.
* sysdeps/ieee754/ldbl-opt/wordsize-64/s_scalbn.c: New file.
* sysdeps/ieee754/ldbl-opt/wordsize-64/s_trunc.c: New file.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/Implies: Add
ieee754/ldbl-opt/wordsize-64.
* sysdeps/powerpc/powerpc64/Implies: Add
ieee754/dbl-64/wordsize-64.
2013-01-10 09:59:58 +01:00
Siddhesh Poyarekar
950c99ca90
Update comments in mpa.c
...
Fixed comment style and clearer wording in some cases.
2013-01-09 19:07:15 +05:30
Siddhesh Poyarekar
fffb407f46
Remove unused __cr and __cpymn
2013-01-04 22:52:12 +05:30
Siddhesh Poyarekar
6420d207bb
Fix code formatting
2013-01-04 15:57:13 +05:30
Siddhesh Poyarekar
a9e48ab40e
Clean up comment for MP_NO
2013-01-04 15:42:09 +05:30
Siddhesh Poyarekar
b783726459
Remove some commented code
2013-01-04 15:30:34 +05:30
Siddhesh Poyarekar
f8af25d218
Remove commented declarations
2013-01-04 15:10:00 +05:30
Siddhesh Poyarekar
302913e17e
Remove argument variable name from function declaration
2013-01-04 14:54:46 +05:30
Joseph Myers
568035b787
Update copyright notices with scripts/update-copyrights.
2013-01-02 19:05:09 +00:00
Siddhesh Poyarekar
0f5477af5d
Fix values in __mpexp_twomm1
2013-01-02 17:43:35 +05:30
Siddhesh Poyarekar
44e0d4c20c
Split mantissa calculation loop and add branch prediction
2013-01-02 11:44:13 +05:30
Siddhesh Poyarekar
4d55b4e596
Add assert for potential access beyond array bounds in m1np
...
The mpexp code has an access into m1np:
for (i=n-1; i>0; i--,n--) { if (m1np[i][p]+m2>0) break; }
which could break for p >= 18 or i >= 7. Fortunately this code is
never called due to the way the exp function is implemented since
values having exponent less than -55 return 1.0. Make sure that if it
gets called in future, it is trapped.
2013-01-02 11:33:11 +05:30
Siddhesh Poyarekar
da08f647d5
Move more constants into static variables
...
Code cleanup.
2013-01-02 10:07:50 +05:30
Joseph Myers
f4cf5f2d8b
Add script to update copyright notices and reformat some to facilitate its use.
2013-01-01 16:29:10 +00:00
Siddhesh Poyarekar
18ea052c3e
Favour normal numbers
2012-12-31 16:05:13 +05:30
Siddhesh Poyarekar
085ec079e3
Demystify the magic number 134217729.0
...
The number 134217729.0 gets used in various places in e_pow.c but
there is no explanation of what that number is. Add that explanation.
2012-12-29 06:56:04 +05:30
Siddhesh Poyarekar
d63f73be34
Remove unnecessary variable mptwoim1
...
Code cleanup.
2012-12-28 19:02:01 +05:30
Siddhesh Poyarekar
6d9f97e1f2
Replace more constants with their values
...
Code cleanup.
2012-12-28 18:53:17 +05:30
Siddhesh Poyarekar
99136f8202
Replace constants with preprocessor defines
...
libm Code cleanup.
2012-12-28 09:40:10 +05:30
Siddhesh Poyarekar
31a7fe5ca9
Remove redundant __mpexp_nn
...
It's an array that stores integral float values of the offset.
2012-12-27 20:43:55 +05:30
Siddhesh Poyarekar
b76eb5f076
Move mpone out to a global const
...
Code cleanup.
2012-12-27 20:43:24 +05:30
Joseph Myers
66ca5a5b93
Include stdlib.h in sysdeps/ieee754/ldbl-128ibm/x2y2m1l.c.
2012-12-05 20:03:45 +00:00
Joseph Myers
b37984ad36
Fix ldbl-128ibm "set but not used" warnings.
2012-12-04 21:19:17 +00:00
Joseph Myers
c33aa6e3e3
Fix "conflicting types for built-in function" warnings from nldbl-*.c.
2012-12-04 20:22:08 +00:00
Joseph Myers
b3b099af03
Fix powl inaccuracy for ldbl-128ibm (bug 14914).
2012-12-04 14:39:24 +00:00
Joseph Myers
9984dd0126
Use hex float 64-bit values in ldbl-96 asinl (bug 14803).
2012-11-28 21:46:16 +00:00
Joseph Myers
0a42601f27
Fix ldbl-128ibm atanl spurious underflows (bug 14871).
2012-11-22 19:56:47 +00:00
Joseph Myers
c60d3bf2fa
Fix sign of inexact zero results for ldbl-128ibm fmal.
2012-11-22 15:00:35 +00:00
Joseph Myers
ef1e0867c0
Fix ldbl-128ibm powl spurious underflows.
2012-11-22 14:59:45 +00:00
Joseph Myers
1468ded38e
Fix ldbl-128ibm hypotl internal underflows (bug 14869).
2012-11-22 14:58:41 +00:00
Joseph Myers
8e27e3cc45
Fix ldbl-128ibm hypotl inaccuracy for arguments with large ratio (bug 14868).
2012-11-22 14:57:22 +00:00
Joseph Myers
7c7feb4772
Fix expm1l spurious underflows for ldbl-128ibm.
2012-11-22 14:55:17 +00:00
Joseph Myers
cf9a5d1861
Fix set-but-not-used warnings in ldbl-128 nearbyintl, rintl.
2012-11-20 14:26:07 +00:00
David S. Miller
6d33cc9d9b
Fix spurious underflows in ldbl-128 atan implementation.
...
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-19 15:31:24 -08:00
David S. Miller
05b227bdae
Correct tinyness handling in long-double and float y0/y1.
...
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-18 12:33:53 -08:00
David S. Miller
8e18b86d4a
Fix BZ #14811 for ldbl-128 too.
...
[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-16 21:39:54 -08:00
David S. Miller
447885ebf1
Don't generate underflow for very small values in log1pl.
...
* sysdeps/ieee754/ldbl-128/s_log1pl.c (__log1pl): If xm1 is
smaller than LDBL_EPSILON/2.0L, just return xm1.
2012-11-16 09:31:38 -08:00
Joseph Myers
60e235ee2a
Fix spurious underflows from pow with results close to 1 (bug 14811).
2012-11-07 13:03:31 +00:00
Joseph Myers
82477c28f4
Fix fma underflows with small x * y (bug 14793).
2012-11-06 14:12:54 +00:00
Joseph Myers
a0c2940d67
Fix fma overflow results outside round-to-nearest mode (bug 14797).
2012-11-04 19:26:02 +00:00
Joseph Myers
5b5b04d628
Make fma use of Dekker and Knuth algorithms use round-to-nearest (bug 14796).
2012-11-03 19:48:53 +00:00
Joseph Myers
473611b22d
Fix fma (a, b, c) for small a * b (bugs 14784, 14785).
2012-11-01 16:47:26 +00:00
Joseph Myers
16a0e2ec87
Fix ldbl-128ibm atan2l for x near 1.
2012-10-31 20:44:59 +00:00
Joseph Myers
ef82f4da79
Fix fma underflow exceptions in after-rounding edge cases.
2012-10-31 13:01:17 +00:00
Joseph Myers
8627a2329c
Fix fma missing underflows and bad results for some subnormal results (bugs 14152, 14783).
2012-10-30 13:54:50 +00:00
Roland McGrath
b8493de0ec
Add missing magic to GLIBC_PROVIDES.
2012-10-09 15:41:30 -07:00
Joseph Myers
bec749fda1
Fix sign of inexact zero return from fma (bug 14645).
2012-10-01 08:30:06 +00:00
Joseph Myers
8ec5b01346
Fix sign of exact zero return from fma (bug 14638).
2012-09-29 18:31:54 +00:00
Steve Ellcey
40cb3caf83
Remove sysdeps/ieee754/ldbl-128/bits/huge_vall.h and let builds
...
use bits/huge_vall.h instead. There is no longer any need for
the special huge_vall.h file.
2012-09-27 14:06:11 -07:00
Joseph Myers
d032e0d29b
Fix inaccuracy of clog, clog10 near |z| = 1 (bug 13629).
2012-09-25 19:43:49 +00:00
Liubov Dmitrieva
22bf5c1793
Add optimized sincosf for SSE2 for x86 and x86-64
2012-09-25 20:47:20 +02:00
Liubov Dmitrieva
4ffffbd272
Add optimized sinf and cosf routines for x86 and x86-64
...
* sysdeps/i386/i686/fpu/multiarch/Makefile (sysdep_routines):
Add s_sinf-sse2, s_conf-sse2.
* sysdeps/i386/i686/fpu/multiarch/s_sinf-sse2.S: New file.
* sysdeps/i386/i686/fpu/multiarch/s_cosf-sse2.S: New file.
* sysdeps/i386/i686/fpu/multiarch/s_sinf.c: New file.
* sysdeps/i386/i686/fpu/multiarch/s_cosf.c: New file.
* sysdeps/ieee754/flt-32/s_sinf.c (SINF, SINF_FUNC): Add macros
for using routine as __sinf_ia32.
Use macro for function declaration and weak_alias.
* sysdeps/ieee754/flt-32/s_cosf.c (COSF, COSF_FUNC): Add macros
for using routine as __cosf_ia32.
Use macro for function declaration and weak_alias.
* sysdeps/i386/i686/fpu/multiarch/e_expf-sse2.S: Fix Copyright.
* sysdeps/i386/i686/fpu/multiarch/e_expf.c: Fix Copyright.
* sysdeps/x86_64/fpu/s_sinf.S: New file.
* sysdeps/x86_64/fpu/s_cosf.S: New file.
* sysdeps/x86_64/fpu/libm-test-ulps: Update.
* math/libm-test.inc (cos_test): Add more test cases.
(sin_test): Likewise.
(sincos_test): Likewise.
2012-09-03 15:32:13 +02:00
Marek Polacek
31035e80a4
Quash warning in s_sincosl.
2012-08-17 23:44:53 +02:00
Roland McGrath
bea9b19322
Fix lots of bitrot for stub configurations.
2012-07-30 16:34:33 -07:00
Marek Polacek
354691b7b5
Set up errno properly for yn.
2012-07-25 12:59:36 +02:00
Marek Polacek
541428fecf
Fix ynl return value with LDBL_MIN.
2012-07-12 16:34:47 +02:00
Adhemerval Zanella
28cfe84316
Fix ctan, ctanh of subnormals in round-upwards mode (bug 14328).
...
IBM long double fixes and POWER ulps update.
2012-07-11 09:19:27 -03:00
Joseph Myers
9ad63c23ea
Fix tanf underflow close to pi/4 (bug 14154).
2012-07-06 21:19:38 +00:00
Joseph Myers
7a845b2c23
Fix float range reduction problems (bug 14283).
2012-07-03 17:11:41 +00:00
Joseph Myers
b7abb4bf78
Fix wordsize-64 cosh regression (bug 14273).
2012-06-21 19:26:09 +00:00
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
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
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
Ulrich Drepper
a0da5fe1e4
More fallout from supporting only ELF
2012-01-08 00:45:01 -05:00
Ulrich Drepper
a784e50247
Remove pre-ISO C support
...
No more __const.
2012-01-07 23:57:22 -05:00
Ulrich Drepper
0269750ca6
Remove non-ELF support
2012-01-07 20:30:26 -05:00
Ulrich Drepper
8ad89ef88d
Avoid warnings about unused variable in 96-bit j0l and j1l
2011-11-12 02:20:29 -05:00
Ulrich Drepper
0c822ef988
Avoid warnings about unused variables in 96-bit hypotl
2011-11-12 02:15:07 -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
Andreas Schwab
246ad57ad6
Add missing _finite aliases
2011-10-23 15:32:05 +02: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
Andreas Schwab
ee2aafe08e
Fix compilation due to __nan defines
2011-10-22 14:03:26 +02:00
Ulrich Drepper
bc62c2fb15
Optimization to some complex math functions
...
Also, change last reference to __sqrt into __sqrt to easily.
2011-10-22 00:32:39 -04:00
Ulrich Drepper
8ec250a484
Add some __builtin_expect to generic __ieee754_log
2011-10-21 12:28:42 -04:00
Ulrich Drepper
d9a8d0abcc
Use new internal libc_fe* interfaces in more functions
2011-10-18 15:11:31 -04:00
Ulrich Drepper
4855e3ddf5
Provide combined internal feholdexcept/fesetround interface
2011-10-18 09:59:04 -04:00
Ulrich Drepper
d38f1dba00
Start optimizing the use of the fenv interfaces in libm itself
2011-10-18 09:00:46 -04:00
Ulrich Drepper
99ce7b04ed
Small optimization of generic exp2
2011-10-17 23:16:34 -04:00
Ulrich Drepper
1004d1821e
Add optimized 64-bit frexp
2011-10-17 22:30:44 -04:00
Ulrich Drepper
ad0f5cad15
Use rounds{s,d} for x86 rint, ceil, floor
2011-10-16 20:58:17 -04:00
Ulrich Drepper
d4a285692a
Optimized floor for 64-bit architectures
2011-10-15 21:44:45 -04:00
Ulrich Drepper
b61099b50a
Add cosh optimized for 64-bit architectures
2011-10-15 20:47:01 -04:00
Ulrich Drepper
bcf01e6d80
Optimize exp
...
Add __exp*_finite optimizations and rewrite some wrappers.
2011-10-15 20:22:59 -04:00
Ulrich Drepper
0ac5ae2335
Optimize libm
...
libm is now somewhat integrated with gcc's -ffinite-math-only option
and lots of the wrapper functions have been optimized.
2011-10-12 11:27:51 -04:00
Andreas Schwab
12cc2fcdb4
Implement __isinf_nsl for IBM long double
2011-10-10 21:39:59 +02:00
Roland McGrath
c658d255e9
Fix some nit warnings.
2011-10-08 15:25:08 -07:00
Ulrich Drepper
7edb55ce06
Optimize use of isnan, isinf, finite
2011-10-08 10:18:26 -04:00
Ulrich Drepper
88738eb6e9
finite for 64-bit platforms
2011-09-15 23:01:56 -04:00
Ulrich Drepper
8682f8b0e4
Optimize logb code for 64-bit machines
2011-09-12 16:21:24 -04:00
Petr Baudis
1248c1c415
Fix jn precision
2011-09-09 22:16:10 -04:00
Paul Pluzhnikov
7f5517aa52
Fix lround() loses precision
2011-09-08 23:37:32 -04:00
Ulrich Drepper
3d4837df4a
Check for finite/infinity parms in IBM Long Double 128 fmal( )
...
This patch addresses some IBM Long Double 128 fmal () test-ldouble.out
and test-ildoubl.out failures. If the ‘x’ and ‘y’ parameters are
finite values and ‘z’ is infinity, the result of fmal () should be ‘z’
not NaN.
Conflicts:
ChangeLog
2011-09-07 22:17:33 -04:00
Jakub Jelinek
85188888f6
Fix up __kernel_rem_pio2 for FLT_EVAL_METHOD != 0 architectures
2011-08-04 15:40:16 -04:00
Jakub Jelinek
3bf8d1b10c
ldbl-128 fmal compile fix
2010-11-22 15:38:35 -05:00
Luis Machado
da93d21475
Fix comparison in sqrtl for IBM long double 128.
2010-11-10 16:15:05 -05:00
Jakub Jelinek
7c08a05c5f
IEEE quad fmal fixes
2010-10-18 07:29:50 -04:00
Jakub Jelinek
3e692e0518
Implement fmal, some fma bugfixes
2010-10-15 15:26:06 -04:00
Jakub Jelinek
f3f7372de1
Fix some more dbl-64/s_fma.c issue
2010-10-15 15:25:14 -04:00
Jakub Jelinek
5e908464b9
Implement accurate fma.
2010-10-13 22:27:03 -04:00