8
8
*
9
9
* Developed at SunPro, a Sun Microsystems, Inc. business.
10
10
* Permission to use, copy, modify, and distribute this
11
- * software is freely granted, provided that this notice
11
+ * software is freely granted, provided that this notice
12
12
* is preserved.
13
13
* ====================================================
14
14
*/
18
18
/* __ieee754_remainderf is provided by libgcc and presumably is faster
19
19
then original implementation */
20
20
21
- #if 1
21
+ #if 0
22
22
23
23
extern float __ieee754_remainderf (float x , float y );
24
24
@@ -55,7 +55,7 @@ extern float __ieee754_remainderf(float x, float y);
55
55
56
56
/* original version */
57
57
58
- /*
58
+ /*
59
59
* __ieee754_fmodf(x,y)
60
60
* Return x mod y in exact arithmetic
61
61
* Method: shift and subtract
@@ -104,13 +104,13 @@ static float one = 1.0, Zero[] = {0.0, -0.0,};
104
104
} else iy = (hy >>23 )- 127 ;
105
105
106
106
/* set up {hx,lx}, {hy,ly} and align y to x */
107
- if (ix >= -126 )
107
+ if (ix >= -126 )
108
108
hx = 0x00800000 |(0x007fffff & hx );
109
109
else { /* subnormal x, shift x to normal */
110
110
n = -126 - ix ;
111
111
hx = hx <<n ;
112
112
}
113
- if (iy >= -126 )
113
+ if (iy >= -126 )
114
114
hy = 0x00800000 |(0x007fffff & hy );
115
115
else { /* subnormal y, shift y to normal */
116
116
n = -126 - iy ;
@@ -133,7 +133,7 @@ static float one = 1.0, Zero[] = {0.0, -0.0,};
133
133
134
134
/* convert back to floating value and restore the sign */
135
135
if (hx == 0 ) /* return sign(x)*0 */
136
- return Zero [(__uint32_t )sx >>31 ];
136
+ return Zero [(__uint32_t )sx >>31 ];
137
137
while (hx < 0x00800000 ) { /* normalize x */
138
138
hx = hx + hx ;
139
139
iy -= 1 ;
@@ -153,4 +153,3 @@ static float one = 1.0, Zero[] = {0.0, -0.0,};
153
153
}
154
154
155
155
#endif
156
-
0 commit comments