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