Update the constants associated with the evaluation of j0f(x)
for |x| small. While here, remove the explicit cast of 0.25 to float. Replace a multiplication involving 0.25 by a division using an integer constant 4. Make a similar change in j0() to minimize the diff. Suggested by: bde
This commit is contained in:
parent
26f96d922b
commit
2656e946c8
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=275518
@ -115,7 +115,7 @@ __ieee754_j0(double x)
|
||||
if(ix<0x3f200000) { /* |x| < 2**-13 */
|
||||
if(huge+x>one) { /* raise inexact if x != 0 */
|
||||
if(ix<0x3e400000) return one; /* |x|<2**-27 */
|
||||
else return one - 0.25*x*x;
|
||||
else return one - x*x/4;
|
||||
}
|
||||
}
|
||||
z = x*x;
|
||||
|
@ -69,10 +69,10 @@ __ieee754_j0f(float x)
|
||||
}
|
||||
return z;
|
||||
}
|
||||
if(ix<0x39000000) { /* |x| < 2**-13 */
|
||||
if(ix<0x3c000000) { /* |x| < 2**-7 */
|
||||
if(huge+x>one) { /* raise inexact if x != 0 */
|
||||
if(ix<0x32000000) return one; /* |x|<2**-27 */
|
||||
else return one - (float)0.25*x*x;
|
||||
if(ix<0x39800000) return one; /* |x|<2**-12 */
|
||||
else return one - x*x/4;
|
||||
}
|
||||
}
|
||||
z = x*x;
|
||||
|
Loading…
Reference in New Issue
Block a user