File tree Expand file tree Collapse file tree 2 files changed +6
-10
lines changed Expand file tree Collapse file tree 2 files changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -120,7 +120,6 @@ Interface Definition (Issue 2).
120
120
static const __float64
121
121
ln2_hi = _F_64 (6.93147180369123816490e-01 ), /* 3fe62e42 fee00000 */
122
122
ln2_lo = _F_64 (1.90821492927058770002e-10 ), /* 3dea39ef 35793c76 */
123
- two54 = _F_64 (1.80143985094819840000e+16 ), /* 43500000 00000000 */
124
123
Lp1 = _F_64 (6.666666666666735130e-01 ), /* 3FE55555 55555593 */
125
124
Lp2 = _F_64 (3.999999999940941908e-01 ), /* 3FD99999 9997FA04 */
126
125
Lp3 = _F_64 (2.857142874366239149e-01 ), /* 3FD24924 94229359 */
@@ -149,11 +148,10 @@ log1p64(__float64 x)
149
148
return __math_invalid (x ); /* log1p(x<-1)=NaN */
150
149
}
151
150
if (ax < 0x3e200000 ) { /* |x| < 2**-29 */
152
- if (two54 + x > zero /* raise inexact */
153
- && ax < 0x3c900000 ) /* |x| < 2**-54 */
154
- return x ;
151
+ if (ax < 0x3c900000 ) /* |x| < 2**-54 */
152
+ return __math_inexact64 (x );
155
153
else
156
- return x - x * x * _F_64 (0.5 );
154
+ return __math_inexact64 ( x - x * x * _F_64 (0.5 ) );
157
155
}
158
156
if (hx > 0 || hx <=((__int32_t )0xbfd2bec3 )) {
159
157
k = 0 ;f = x ;hu = 1 ;} /* -0.2929<x<0.41422 */
Original file line number Diff line number Diff line change 19
19
static const float
20
20
ln2_hi = 6.9313812256e-01 , /* 0x3f317180 */
21
21
ln2_lo = 9.0580006145e-06 , /* 0x3717f7d1 */
22
- two25 = 3.355443200e+07 , /* 0x4c000000 */
23
22
Lp1 = 6.6666668653e-01 , /* 3F2AAAAB */
24
23
Lp2 = 4.0000000596e-01 , /* 3ECCCCCD */
25
24
Lp3 = 2.8571429849e-01 , /* 3E924925 */
@@ -49,11 +48,10 @@ log1pf(float x)
49
48
return __math_invalidf (x ); /* log1p(x<-1)=NaN */
50
49
}
51
50
if (ax < 0x31000000 ) { /* |x| < 2**-29 */
52
- if (two25 + x > zero /* raise inexact */
53
- && ax < 0x24800000 ) /* |x| < 2**-54 */
54
- return x ;
51
+ if (ax < 0x24800000 ) /* |x| < 2**-54 */
52
+ return __math_inexactf (x );
55
53
else
56
- return x - x * x * (float )0.5 ;
54
+ return __math_inexactf ( x - x * x * (float )0.5 ) ;
57
55
}
58
56
if (hx > 0 || hx <=((__int32_t )0xbe95f61f )) {
59
57
k = 0 ;f = x ;hu = 1 ;} /* -0.2929<x<0.41422 */
You can’t perform that action at this time.
0 commit comments