summaryrefslogtreecommitdiffstats
path: root/lib/msun
diff options
context:
space:
mode:
authorkargl <kargl@FreeBSD.org>2012-10-13 19:53:11 +0000
committerkargl <kargl@FreeBSD.org>2012-10-13 19:53:11 +0000
commite323b9460e2fa343ab07a6a94df4bfbd183b449e (patch)
tree3faad3abcd7377655b098dc240bc0a7e25865fca /lib/msun
parentf9c782221359e602e4b46d2d46489ab0ee82311b (diff)
downloadFreeBSD-src-e323b9460e2fa343ab07a6a94df4bfbd183b449e.zip
FreeBSD-src-e323b9460e2fa343ab07a6a94df4bfbd183b449e.tar.gz
* Update the comment that explains the choice of values in the
table and the requirement on trailing zero bits. * Remove the __aligned() compiler directives as these were found to have a negative effect on the produced code. Submitted by: bde Approved by: das (mentor)
Diffstat (limited to 'lib/msun')
-rw-r--r--lib/msun/ld80/s_expl.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/msun/ld80/s_expl.c b/lib/msun/ld80/s_expl.c
index 2395abe..af63668 100644
--- a/lib/msun/ld80/s_expl.c
+++ b/lib/msun/ld80/s_expl.c
@@ -64,7 +64,7 @@ o_threshold = LD80C(0xb17217f7d1cf79ab, 13, 11356.5234062941439488L),
/* log(2**(-16381-64-1)) rounded towards zero: */
u_threshold = LD80C(0xb21dfe7f09e2baa9, 13, -11399.4985314888605581L);
-static const double __aligned(64)
+static const double
/*
* ln2/INTERVALS = L1+L2 (hi+lo decomposition for multiplication). L1 must
* have at least 22 (= log2(|LDBL_MIN_EXP-extras|) + log2(INTERVALS)) lowest
@@ -86,17 +86,18 @@ P6 = 1.3888891738560272e-3; /* 0x16c16c651633ae.0p-62 */
/*
* 2^(i/INTERVALS) for i in [0,INTERVALS] is represented by two values where
- * the first 53 bits of the significand is stored in hi and the next 53
- * bits are in lo. Tang's paper states that the trailing 6 bits of hi should
+ * the first 53 bits of the significand are stored in hi and the next 53
+ * bits are in lo. Tang's paper states that the trailing 6 bits of hi must
* be zero for his algorithm in both single and double precision, because
* the table is re-used in the implementation of expm1() where a floating
- * point addition involving hi must be exact. The conversion of a 53-bit
- * double into a 64-bit long double gives 11 trailing bit, which are zero.
+ * point addition involving hi must be exact. Here hi is double, so
+ * converting it to long double gives 11 trailing zero bits.
*/
static const struct {
double hi;
double lo;
-} s[INTERVALS] __aligned(16) = {
+/* XXX should rename 's'. */
+} s[INTERVALS] = {
0x1p+0, 0x0p+0,
0x1.0163da9fb3335p+0, 0x1.b61299ab8cdb7p-54,
0x1.02c9a3e778060p+0, 0x1.dcdef95949ef4p-53,
OpenPOWER on IntegriCloud