mirror of
https://git.planet-casio.com/Lephenixnoir/OpenLibm.git
synced 2025-01-06 08:53:40 +01:00
more accurate comment for the x==1.0 hack
This commit is contained in:
parent
9bc257a323
commit
89d232d114
1 changed files with 4 additions and 2 deletions
|
@ -125,8 +125,10 @@ __ieee754_exp(double x) /* default IEEE double exp */
|
||||||
if(x < u_threshold) return twom1000*twom1000; /* underflow */
|
if(x < u_threshold) return twom1000*twom1000; /* underflow */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* by pure bad luck, this implementation's error for x==1.0 is
|
/* this implementation gives 2.7182818284590455 for exp(1.0),
|
||||||
unusually large, although still within 1 ulp. */
|
which is well within the allowable error. however,
|
||||||
|
2.718281828459045 is closer to the true value so we prefer that
|
||||||
|
answer, given that 1.0 is such an important argument value. */
|
||||||
if (x == 1.0)
|
if (x == 1.0)
|
||||||
return 2.718281828459045235360;
|
return 2.718281828459045235360;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue