Lines Matching defs:exp

1381 /* exp(x)
1394 * 2. Approximation of exp(r) by a special rational function on
1397 * R(r**2) = r*(exp(r)+1)/(exp(r)-1) = 2 + r*r/6 - r**4/360 + ...
1408 * The computation of exp(r) thus becomes
1410 * exp(r) = 1 + -------
1419 * 3. Scale back to obtain exp(x):
1421 * exp(x) = 2^k * exp(r)
1424 * exp(INF) is INF, exp(NaN) is NaN;
1425 * exp(-INF) is 0, and
1426 * for finite argument, only exp(0)=1 is exact.
1434 * if x > 7.09782712893383973096e+02 then exp(x) overflow
1435 * if x < -7.45133219101941108420e+02 then exp(x) underflow
1443 double exp(double x) {
1482 return (xsb == 0) ? x : 0.0; /* exp(+-inf)={inf,0} */
1491 /* TODO(rtoy): We special case exp(1) here to return the correct
2116 * Returns exp(x)-1, the exponential of x minus 1.
2130 * r*(exp(r)+1)/(exp(r)-1) = 2+ r^2/6 - r^4/360 + ...
2132 * r*(exp(r)+1)/(exp(r)-1) = 2+ r^2/6 * R1(r*r)
2134 * R1(r**2) = 6/r *((exp(r)+1)/(exp(r)-1) - 2/r)
2135 * = 6/r * ( 1 + 2.0*(1/(exp(r)-1) - 1/r))
2153 * expm1(r) = exp(r)-1 is then computed by the following
2186 * (v) if (k<-2||k>56) return 2^k(1-(E-r)) - 1 (or exp(x)-1)
2244 return (xsb == 0) ? x : -1.0; /* exp(+-inf)={inf,-1} */
2303 if (k <= -2 || k > 56) { /* suffice to return exp(x)-1 */
2528 * mathematically cosh(x) if defined to be (exp(x)+exp(-x))/2
2531 * [ exp(x) - 1 ]^2
2533 * 2*exp(x)
2535 * exp(x) + 1/exp(x)
2538 * 22 <= x <= lnovft : cosh(x) := exp(x)/2
2539 * lnovft <= x <= ln2ovft: cosh(x) := exp(x/2)/2 * exp(x/2)
2557 // |x| in [0,0.5*log2], return 1+expm1(|x|)^2/(2*exp(|x|))
2566 // |x| in [0.5*log2, 22], return (exp(|x|)+1/exp(|x|)/2
2568 double t = exp(fabs(x));
2572 // |x| in [22, log(maxdouble)], return half*exp(|x|)
2573 if (ix < 0x40862E42) return half * exp(fabs(x));
2577 double w = exp(half * fabs(x));
2602 * 3. Return x**y = 2**n*exp(y'*log2)
2904 * mathematically sinh(x) if defined to be (exp(x)-exp(-x))/2
2911 * 22 <= x <= lnovft : sinh(x) := exp(x)/2
2912 * lnovft <= x <= ln2ovft: sinh(x) := exp(x/2)/2 * exp(x/2)
2938 // |x| in [22, log(maxdouble)], return 0.5 * exp(|x|)
2939 if (ax < LOG_MAXD) return h * exp(ax);
2943 double w = exp(0.5 * ax);