diff options
author | Jakub Jelinek <jakub@redhat.com> | 2007-03-17 21:53:01 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2007-03-17 21:53:01 +0000 |
commit | 6ce38a95a4c8318df75cf91fbd90101601b3fa7f (patch) | |
tree | 044df11ca5f10f967644dffe5b0f621d6ac36188 /sysdeps/ieee754 | |
parent | b428b742cf54d423e5a7a68fcbec9473303eeafa (diff) | |
download | glibc-6ce38a95a4c8318df75cf91fbd90101601b3fa7f.tar.gz glibc-6ce38a95a4c8318df75cf91fbd90101601b3fa7f.tar.xz glibc-6ce38a95a4c8318df75cf91fbd90101601b3fa7f.zip |
Updated to fedora-glibc-20070317T2130 cvs/fedora-glibc-2_5_90-19
Diffstat (limited to 'sysdeps/ieee754')
-rw-r--r-- | sysdeps/ieee754/dbl-64/e_pow.c | 22 | ||||
-rw-r--r-- | sysdeps/ieee754/ldbl-128/Makefile | 1 |
2 files changed, 12 insertions, 11 deletions
diff --git a/sysdeps/ieee754/dbl-64/e_pow.c b/sysdeps/ieee754/dbl-64/e_pow.c index d9bd8b479f..1e159f2c0b 100644 --- a/sysdeps/ieee754/dbl-64/e_pow.c +++ b/sysdeps/ieee754/dbl-64/e_pow.c @@ -106,20 +106,28 @@ double __ieee754_pow(double x, double y) { else return y < 0 ? 1.0/ABS(x) : 0.0; /* return 0 */ } + + qx = u.i[HIGH_HALF]&0x7fffffff; /* no sign */ + qy = v.i[HIGH_HALF]&0x7fffffff; /* no sign */ + + if (qx >= 0x7ff00000 && (qx > 0x7ff00000 || u.i[LOW_HALF] != 0)) return NaNQ.x; + if (qy >= 0x7ff00000 && (qy > 0x7ff00000 || v.i[LOW_HALF] != 0)) + return x == 1.0 ? 1.0 : NaNQ.x; + /* if x<0 */ if (u.i[HIGH_HALF] < 0) { k = checkint(y); if (k==0) { - if ((v.i[HIGH_HALF] & 0x7fffffff) == 0x7ff00000 && v.i[LOW_HALF] == 0) { + if (qy == 0x7ff00000) { if (x == -1.0) return 1.0; else if (x > -1.0) return v.i[HIGH_HALF] < 0 ? INF.x : 0.0; else return v.i[HIGH_HALF] < 0 ? 0.0 : INF.x; } - else if (u.i[HIGH_HALF] == 0xfff00000 && u.i[LOW_HALF] == 0) + else if (qx == 0x7ff00000) return y < 0 ? 0.0 : INF.x; return NaNQ.x; /* y not integer and x<0 */ } - else if (u.i[HIGH_HALF] == 0xfff00000 && u.i[LOW_HALF] == 0) + else if (qx == 0x7ff00000) { if (k < 0) return y < 0 ? nZERO.x : nINF.x; @@ -129,14 +137,6 @@ double __ieee754_pow(double x, double y) { return (k==1)?__ieee754_pow(-x,y):-__ieee754_pow(-x,y); /* if y even or odd */ } /* x>0 */ - qx = u.i[HIGH_HALF]&0x7fffffff; /* no sign */ - qy = v.i[HIGH_HALF]&0x7fffffff; /* no sign */ - - if (qx > 0x7ff00000 || (qx == 0x7ff00000 && u.i[LOW_HALF] != 0)) return NaNQ.x; - /* if 0<x<2^-0x7fe */ - if (qy > 0x7ff00000 || (qy == 0x7ff00000 && v.i[LOW_HALF] != 0)) - return x == 1.0 ? 1.0 : NaNQ.x; - /* if y<2^-0x7fe */ if (qx == 0x7ff00000) /* x= 2^-0x3ff */ {if (y == 0) return NaNQ.x; diff --git a/sysdeps/ieee754/ldbl-128/Makefile b/sysdeps/ieee754/ldbl-128/Makefile new file mode 100644 index 0000000000..8fd6dad343 --- /dev/null +++ b/sysdeps/ieee754/ldbl-128/Makefile @@ -0,0 +1 @@ +long-double-fcts = yes |