e raised to x. Overflow gives infinity (above about 709.78 for float64), underflow gives zero, NaN stays NaN. float and float64; the float form computes in float64 and rounds. Written in Jai, so the last digit can differ from a C library's exp.
assert(exp(cast(float64) 0) == 1);
assert(abs(exp(cast(float64) 1) - 2.718281828459045) < 0.000001);
assert(isinf(exp(cast(float64) 1000)) && exp(cast(float64) -1000) == 0);exp :: (x: float64) -> float64
e raised to x. Overflow gives infinity, underflow gives 0.
Parameters
- x: float64
- the exponent.
Returns
- float64
exp :: (x: float) -> float
e raised to x. Overflow gives infinity, underflow gives 0.
Parameters
- x: float
- the exponent.
Returns
- float