[PATCH][libm] Fix values in __mpexp_twomm1
Siddhesh Poyarekar
siddhesh@redhat.com
Thu Dec 27 16:21:00 GMT 2012
Hi,
__mpexp_twomm1 holds values of 2^-i where i is the value at the same
offset in the array m1p. However, the first values of __mpexp_twomm1
are set as 0 instead of 2^0. Attached patch fixes this. There are no
regressions in the testsuite resulting from this change. OK to
commit?
Siddhesh
* sysdeps/ieee754/dbl-64/mpexp.h (__mpexp_twomm1): Fix first
four values.
diff --git a/sysdeps/ieee754/dbl-64/mpexp.h b/sysdeps/ieee754/dbl-64/mpexp.h
index 59f5c67..44f509d 100644
--- a/sysdeps/ieee754/dbl-64/mpexp.h
+++ b/sysdeps/ieee754/dbl-64/mpexp.h
@@ -33,10 +33,10 @@ extern const number __mpexp_twomm1[33] attribute_hidden;
#ifdef BIG_ENDI
const number
__mpexp_twomm1[33] = { /* 2**-m1 */
-/**/ {{0x00000000, 0x00000000} }, /* 0 */
-/**/ {{0x00000000, 0x00000000} }, /* 0 */
-/**/ {{0x00000000, 0x00000000} }, /* 0 */
-/**/ {{0x00000000, 0x00000000} }, /* 0 */
+/**/ {{0x3ff00000, 0x00000000} }, /* 1 */
+/**/ {{0x3ff00000, 0x00000000} }, /* 1 */
+/**/ {{0x3ff00000, 0x00000000} }, /* 1 */
+/**/ {{0x3ff00000, 0x00000000} }, /* 1 */
/**/ {{0x3ee00000, 0x00000000} }, /* 2**-17 */
/**/ {{0x3e800000, 0x00000000} }, /* 2**-23 */
/**/ {{0x3e800000, 0x00000000} }, /* 2**-23 */
@@ -72,10 +72,10 @@ extern const number __mpexp_twomm1[33] attribute_hidden;
#ifdef LITTLE_ENDI
const number
__mpexp_twomm1[33] = { /* 2**-m1 */
-/**/ {{0x00000000, 0x00000000} }, /* 0 */
-/**/ {{0x00000000, 0x00000000} }, /* 0 */
-/**/ {{0x00000000, 0x00000000} }, /* 0 */
-/**/ {{0x00000000, 0x00000000} }, /* 0 */
+/**/ {{0x00000000, 0x3ff00000} }, /* 1 */
+/**/ {{0x00000000, 0x3ff00000} }, /* 1 */
+/**/ {{0x00000000, 0x3ff00000} }, /* 1 */
+/**/ {{0x00000000, 0x3ff00000} }, /* 1 */
/**/ {{0x00000000, 0x3ee00000} }, /* 2**-17 */
/**/ {{0x00000000, 0x3e800000} }, /* 2**-23 */
/**/ {{0x00000000, 0x3e800000} }, /* 2**-23 */
More information about the Libc-alpha
mailing list