diff options
author | Siddhesh Poyarekar <siddhesh@redhat.com> | 2012-12-29 06:56:04 +0530 |
---|---|---|
committer | Siddhesh Poyarekar <siddhesh@redhat.com> | 2012-12-29 06:56:04 +0530 |
commit | 085ec079e37b0013b421c97b467c6b8ea36a1289 (patch) | |
tree | 9a1c10530befa9e1e2358a425d9857d693ae7463 /sysdeps/ieee754/dbl-64/e_pow.c | |
parent | c93c5dec54a64563ce85b511053bd22161085d77 (diff) | |
download | glibc-085ec079e37b0013b421c97b467c6b8ea36a1289.tar.gz glibc-085ec079e37b0013b421c97b467c6b8ea36a1289.tar.xz glibc-085ec079e37b0013b421c97b467c6b8ea36a1289.zip |
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.
Diffstat (limited to 'sysdeps/ieee754/dbl-64/e_pow.c')
-rw-r--r-- | sysdeps/ieee754/dbl-64/e_pow.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sysdeps/ieee754/dbl-64/e_pow.c b/sysdeps/ieee754/dbl-64/e_pow.c index 513171891c..1d535cb6e3 100644 --- a/sysdeps/ieee754/dbl-64/e_pow.c +++ b/sysdeps/ieee754/dbl-64/e_pow.c @@ -95,10 +95,10 @@ __ieee754_pow(double x, double y) { if (ABS (y) < 0x1p-64) y = y < 0 ? -0x1p-64 : 0x1p-64; z = log1(x,&aa,&error); /* x^y =e^(y log (X)) */ - t = y*134217729.0; + t = y*CN; y1 = t - (t-y); y2 = y - y1; - t = z*134217729.0; + t = z*CN; a1 = t - (t-z); a2 = (z - a1)+aa; a = y1*a1; @@ -182,10 +182,10 @@ SECTION power1(double x, double y) { double z,a,aa,error, t,a1,a2,y1,y2; z = my_log2(x,&aa,&error); - t = y*134217729.0; + t = y*CN; y1 = t - (t-y); y2 = y - y1; - t = z*134217729.0; + t = z*CN; a1 = t - (t-z); a2 = z - a1; a = y*z; |