diff options
author | Jakub Jelinek <jakub@redhat.com> | 2010-01-16 17:55:37 -0800 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2010-01-16 17:55:37 -0800 |
commit | 64f388285e11812f041d3aa8347f82efde4033c1 (patch) | |
tree | 5631149d6951216e5c41ea136ee26c5da06e08dc /sysdeps/ieee754/ldbl-128/s_nexttowardf.c | |
parent | 893549c5a06956d2559391a3ffdeb6ded53b65c0 (diff) | |
download | glibc-64f388285e11812f041d3aa8347f82efde4033c1.zip glibc-64f388285e11812f041d3aa8347f82efde4033c1.tar.gz glibc-64f388285e11812f041d3aa8347f82efde4033c1.tar.bz2 |
sysdeps/ieee754/ldbl-128/ fixes
Diffstat (limited to 'sysdeps/ieee754/ldbl-128/s_nexttowardf.c')
-rw-r--r-- | sysdeps/ieee754/ldbl-128/s_nexttowardf.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/sysdeps/ieee754/ldbl-128/s_nexttowardf.c b/sysdeps/ieee754/ldbl-128/s_nexttowardf.c index 1a22e01..1f37d80 100644 --- a/sysdeps/ieee754/ldbl-128/s_nexttowardf.c +++ b/sysdeps/ieee754/ldbl-128/s_nexttowardf.c @@ -44,10 +44,12 @@ static char rcsid[] = "$NetBSD: $"; return x+y; if((long double) x==y) return y; /* x=y, return y */ if(ix==0) { /* x == 0 */ - float x2; + float u; SET_FLOAT_WORD(x,(u_int32_t)((hy>>32)&0x80000000)|1);/* return +-minsub*/ - x2 = x*x; - if(x2==x) return x2; else return x; /* raise underflow flag */ + u = math_opt_barrier (x); + u = u * u; + math_force_eval (u); /* raise underflow flag */ + return x; } if(hx>=0) { /* x > 0 */ if(hy<0||(ix>>23)>(iy>>48)-0x3f80 @@ -68,12 +70,9 @@ static char rcsid[] = "$NetBSD: $"; } hy = hx&0x7f800000; if(hy>=0x7f800000) return x+x; /* overflow */ - if(hy<0x00800000) { /* underflow */ - float x2 = x*x; - if(x2!=x) { /* raise underflow flag */ - SET_FLOAT_WORD(x2,hx); - return x2; - } + if(hy<0x00800000) { + float u = x*x; /* underflow */ + math_force_eval (u); /* raise underflow flag */ } SET_FLOAT_WORD(x,hx); return x; |