aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddhesh@redhat.com>2012-12-27 20:43:55 +0530
committerSiddhesh Poyarekar <siddhesh@redhat.com>2012-12-27 20:43:55 +0530
commit31a7fe5ca943b8bd76357c9c013211f8c17db833 (patch)
tree68684e37c78e26a0f9e4e7683a867b07871762c5
parentb76eb5f076d362cdfbb95f0986285a8661e4082f (diff)
downloadglibc-31a7fe5ca943b8bd76357c9c013211f8c17db833.tar
glibc-31a7fe5ca943b8bd76357c9c013211f8c17db833.tar.gz
glibc-31a7fe5ca943b8bd76357c9c013211f8c17db833.tar.bz2
glibc-31a7fe5ca943b8bd76357c9c013211f8c17db833.zip
Remove redundant __mpexp_nn
It's an array that stores integral float values of the offset.
-rw-r--r--ChangeLog4
-rw-r--r--sysdeps/ieee754/dbl-64/mpexp.c4
-rw-r--r--sysdeps/ieee754/dbl-64/mpexp.h26
3 files changed, 6 insertions, 28 deletions
diff --git a/ChangeLog b/ChangeLog
index 7216ca6a40..2a9a361266 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2012-12-27 Siddhesh Poyarekar <siddhesh@redhat.com>
+ * sysdeps/ieee754/dbl-64/mpexp.c (__mpexp): Eliminate __mpexp_nn
+ and use variable directly.
+ * sysdeps/ieee754/dbl-64/mpexp.h (__mpexp_nn): Remove.
+
* sysdeps/ieee754/dbl-64/mpa.c [! NO__CONST]: New constant
MPONE.
* sysdeps/ieee754/dbl-64/mpa.h: Declare MPONE.
diff --git a/sysdeps/ieee754/dbl-64/mpexp.c b/sysdeps/ieee754/dbl-64/mpexp.c
index 2762ba91fb..c5a0283bdd 100644
--- a/sysdeps/ieee754/dbl-64/mpexp.c
+++ b/sysdeps/ieee754/dbl-64/mpexp.c
@@ -81,12 +81,12 @@ __mpexp(mp_no *x, mp_no *y, int p) {
__mul(x,&mpt1,&mps,p);
/* Evaluate the polynomial. Put result in mpt2 */
- mpk.e = 1; mpk.d[0] = ONE; mpk.d[1]=__mpexp_nn[n].d;
+ mpk.e = 1; mpk.d[0] = ONE; mpk.d[1]=n;
__dvd(&mps,&mpk,&mpt1,p);
__add(&mpone,&mpt1,&mpak,p);
for (k=n-1; k>1; k--) {
__mul(&mps,&mpak,&mpt1,p);
- mpk.d[1]=__mpexp_nn[k].d;
+ mpk.d[1] = k;
__dvd(&mpt1,&mpk,&mpt2,p);
__add(&mpone,&mpt2,&mpak,p);
}
diff --git a/sysdeps/ieee754/dbl-64/mpexp.h b/sysdeps/ieee754/dbl-64/mpexp.h
index 390e2720b0..758255b0fd 100644
--- a/sysdeps/ieee754/dbl-64/mpexp.h
+++ b/sysdeps/ieee754/dbl-64/mpexp.h
@@ -28,7 +28,6 @@
#define MPEXP_H
extern const number __mpexp_twomm1[33] attribute_hidden;
-extern const number __mpexp_nn[9] attribute_hidden;
extern const number __mpexp_radix attribute_hidden;
extern const number __mpexp_radixi attribute_hidden;
extern const number __mpexp_zero attribute_hidden;
@@ -75,18 +74,6 @@ extern const number __mpexp_half attribute_hidden;
/**/ {{0x3b100000, 0x00000000} }, /* 2**-78 */
/**/ {{0x3ae00000, 0x00000000} }, /* 2**-81 */
};
- const number
- __mpexp_nn[9]={ /* n */
-/**/ {{0x00000000, 0x00000000} }, /* 0 */
-/**/ {{0x3ff00000, 0x00000000} }, /* 1 */
-/**/ {{0x40000000, 0x00000000} }, /* 2 */
-/**/ {{0x40080000, 0x00000000} }, /* 3 */
-/**/ {{0x40100000, 0x00000000} }, /* 4 */
-/**/ {{0x40140000, 0x00000000} }, /* 5 */
-/**/ {{0x40180000, 0x00000000} }, /* 6 */
-/**/ {{0x401c0000, 0x00000000} }, /* 7 */
-/**/ {{0x40200000, 0x00000000} }, /* 8 */
- };
const number
/**/ __mpexp_radix = {{0x41700000, 0x00000000} }, /* 2**24 */
@@ -135,19 +122,6 @@ extern const number __mpexp_half attribute_hidden;
/**/ {{0x00000000, 0x3ae00000} }, /* 2**-81 */
};
const number
- __mpexp_nn[9]={ /* n */
-/**/ {{0x00000000, 0x00000000} }, /* 0 */
-/**/ {{0x00000000, 0x3ff00000} }, /* 1 */
-/**/ {{0x00000000, 0x40000000} }, /* 2 */
-/**/ {{0x00000000, 0x40080000} }, /* 3 */
-/**/ {{0x00000000, 0x40100000} }, /* 4 */
-/**/ {{0x00000000, 0x40140000} }, /* 5 */
-/**/ {{0x00000000, 0x40180000} }, /* 6 */
-/**/ {{0x00000000, 0x401c0000} }, /* 7 */
-/**/ {{0x00000000, 0x40200000} }, /* 8 */
- };
-
- const number
/**/ __mpexp_radix = {{0x00000000, 0x41700000} }, /* 2**24 */
/**/ __mpexp_radixi = {{0x00000000, 0x3e700000} }, /* 2**-24 */
/**/ __mpexp_zero = {{0x00000000, 0x00000000} }, /* 0 */