summaryrefslogtreecommitdiffstats
path: root/lib/libm/src/s_floorf.c
diff options
context:
space:
mode:
authorotto <otto@openbsd.org>2006-04-25 18:15:36 +0000
committerotto <otto@openbsd.org>2006-04-25 18:15:36 +0000
commit55fa043fb614f21583674600aad40928e3543fb2 (patch)
tree925be78444cffad62b1e9f40ecea2984bbe18734 /lib/libm/src/s_floorf.c
parentenable udcf, why not (diff)
downloadwireguard-openbsd-55fa043fb614f21583674600aad40928e3543fb2.tar.xz
wireguard-openbsd-55fa043fb614f21583674600aad40928e3543fb2.zip
Avoid shadowing of external symbols by local variables; whoever
thought up the names of the bessel functions deserves a beating. ok deraadt@
Diffstat (limited to 'lib/libm/src/s_floorf.c')
-rw-r--r--lib/libm/src/s_floorf.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/libm/src/s_floorf.c b/lib/libm/src/s_floorf.c
index c1c99e0dc75..db7fd4d866c 100644
--- a/lib/libm/src/s_floorf.c
+++ b/lib/libm/src/s_floorf.c
@@ -34,27 +34,27 @@ static const float huge = 1.0e30;
float
floorf(float x)
{
- int32_t i0,j0;
+ int32_t i0,jj0;
u_int32_t i;
GET_FLOAT_WORD(i0,x);
- j0 = ((i0>>23)&0xff)-0x7f;
- if(j0<23) {
- if(j0<0) { /* raise inexact if x != 0 */
+ jj0 = ((i0>>23)&0xff)-0x7f;
+ if(jj0<23) {
+ if(jj0<0) { /* raise inexact if x != 0 */
if(huge+x>(float)0.0) {/* return 0*sign(x) if |x|<1 */
if(i0>=0) {i0=0;}
else if((i0&0x7fffffff)!=0)
{ i0=0xbf800000;}
}
} else {
- i = (0x007fffff)>>j0;
+ i = (0x007fffff)>>jj0;
if((i0&i)==0) return x; /* x is integral */
if(huge+x>(float)0.0) { /* raise inexact flag */
- if(i0<0) i0 += (0x00800000)>>j0;
+ if(i0<0) i0 += (0x00800000)>>jj0;
i0 &= (~i);
}
}
} else {
- if(j0==0x80) return x+x; /* inf or NaN */
+ if(jj0==0x80) return x+x; /* inf or NaN */
else return x; /* x is integral */
}
SET_FLOAT_WORD(x,i0);