exp
fn exp(float x) -> float
Source: compiler/src/builtin_docs/prelude/math.hy Returns e raised to the power x.
Parameters#
| Name | Type |
|---|---|
x | float |
Returns#
float
Examples#
use tests::assert;
assert!(exp(0.0) == 1.0);
assert!(ln(exp(2.0)) == 2.0);
See also#
sin: Returns the sine ofx(in radians).cos: Returns the cosine ofx(in radians).tan: Returns the tangent ofx(in radians).sqrt: Returns the square root ofx.floor: Returns the largest whole number less than or equal tox, as afloat.ceil: Returns the smallest whole number greater than or equal tox, as afloat.ln: Returns the natural logarithm ofx.atan: Returns the arctangent ofx, in radians in-pi/2..=pi/2.