diff options
author | Ulrich Drepper <drepper@gmail.com> | 2011-10-16 20:58:17 -0400 |
---|---|---|
committer | Ulrich Drepper <drepper@gmail.com> | 2011-10-16 20:58:17 -0400 |
commit | ad0f5cad15f1c76faf3843b3e189dead2c05cfcc (patch) | |
tree | d3ed2cb9df7536e17a275d08bdb09b2840fee5e5 /sysdeps/ieee754/dbl-64/s_floor.c | |
parent | aac13307d6879af0f46e6b26895244d063c50db5 (diff) | |
download | glibc-ad0f5cad15f1c76faf3843b3e189dead2c05cfcc.tar.gz glibc-ad0f5cad15f1c76faf3843b3e189dead2c05cfcc.tar.xz glibc-ad0f5cad15f1c76faf3843b3e189dead2c05cfcc.zip |
Use rounds{s,d} for x86 rint, ceil, floor
Diffstat (limited to 'sysdeps/ieee754/dbl-64/s_floor.c')
-rw-r--r-- | sysdeps/ieee754/dbl-64/s_floor.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/sysdeps/ieee754/dbl-64/s_floor.c b/sysdeps/ieee754/dbl-64/s_floor.c index 77db9ef392..5b593ca316 100644 --- a/sysdeps/ieee754/dbl-64/s_floor.c +++ b/sysdeps/ieee754/dbl-64/s_floor.c @@ -10,10 +10,6 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: s_floor.c,v 1.8 1995/05/10 20:47:20 jtc Exp $"; -#endif - /* * floor(x) * Return x rounded toward -inf to integral value @@ -44,7 +40,7 @@ static double huge = 1.0e300; EXTRACT_WORDS(i0,i1,x); j0 = ((i0>>20)&0x7ff)-0x3ff; if(j0<20) { - if(j0<0) { /* raise inexact if x != 0 */ + if(j0<0) { /* raise inexact if x != 0 */ if(huge+x>0.0) {/* return 0*sign(x) if |x|<1 */ if(i0>=0) {i0=i1=0;} else if(((i0&0x7fffffff)|i1)!=0) @@ -64,12 +60,12 @@ static double huge = 1.0e300; } else { i = ((u_int32_t)(0xffffffff))>>(j0-20); if((i1&i)==0) return x; /* x is integral */ - if(huge+x>0.0) { /* raise inexact flag */ + if(huge+x>0.0) { /* raise inexact flag */ if(i0<0) { if(j0==20) i0+=1; else { j = i1+(1<<(52-j0)); - if(j<i1) i0 +=1 ; /* got a carry */ + if(j<i1) i0 +=1 ; /* got a carry */ i1=j; } } @@ -79,8 +75,10 @@ static double huge = 1.0e300; INSERT_WORDS(x,i0,i1); return x; } +#ifndef __floor weak_alias (__floor, floor) -#ifdef NO_LONG_DOUBLE +# ifdef NO_LONG_DOUBLE strong_alias (__floor, __floorl) weak_alias (__floor, floorl) +# endif #endif |