File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -150,10 +150,15 @@ __ieee754_pow(double x, double y)
150150 if (iy == 0x3ff00000 ) { /* y is +-1 */
151151 if (hy < 0 ) return one /x ; else return x ;
152152 }
153- if (hy == 0x40000000 ) return x * x ; /* y is 2 */
154- if (hy == 0x3fe00000 ) { /* y is 0.5 */
153+ if (hy == 0x40000000 ) return x * x ; /* y is 2 */
154+ if (hy == 0x40080000 ) return x * x * x ; /* y is 3 */
155+ if (hy == 0x40100000 ) { /* y is 4 */
156+ u = x * x ;
157+ return u * u ;
158+ }
159+ if (hy == 0x3fe00000 ) { /* y is 0.5 */
155160 if (hx >=0 ) /* x >= +0 */
156- return sqrt (x );
161+ return sqrt (x );
157162 }
158163 }
159164
Original file line number Diff line number Diff line change @@ -102,10 +102,15 @@ __ieee754_powf(float x, float y)
102102 if (iy == 0x3f800000 ) { /* y is +-1 */
103103 if (hy < 0 ) return one /x ; else return x ;
104104 }
105- if (hy == 0x40000000 ) return x * x ; /* y is 2 */
106- if (hy == 0x3f000000 ) { /* y is 0.5 */
105+ if (hy == 0x40000000 ) return x * x ; /* y is 2 */
106+ if (hy == 0x40400000 ) return x * x * x ; /* y is 3 */
107+ if (hy == 0x40800000 ) { /* y is 4 */
108+ u = x * x ;
109+ return u * u ;
110+ }
111+ if (hy == 0x3f000000 ) { /* y is 0.5 */
107112 if (hx >=0 ) /* x >= +0 */
108- return __ieee754_sqrtf (x );
113+ return __ieee754_sqrtf (x );
109114 }
110115
111116 ax = fabsf (x );
You can’t perform that action at this time.
0 commit comments