We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9bc257a commit 89d232dCopy full SHA for 89d232d
src/e_exp.c
@@ -125,8 +125,10 @@ __ieee754_exp(double x) /* default IEEE double exp */
125
if(x < u_threshold) return twom1000*twom1000; /* underflow */
126
}
127
128
- /* by pure bad luck, this implementation's error for x==1.0 is
129
- unusually large, although still within 1 ulp. */
+ /* this implementation gives 2.7182818284590455 for exp(1.0),
+ which is well within the allowable error. however,
130
+ 2.718281828459045 is closer to the true value so we prefer that
131
+ answer, given that 1.0 is such an important argument value. */
132
if (x == 1.0)
133
return 2.718281828459045235360;
134
0 commit comments