$std::math
This module provides a Pyro interface to the C standard library's mathematical functions.
Variables

e

Euler's constant as an
$f64
. 
inf

Floatingpoint positive infinity as an
$f64
. 
nan

Floatingpoint NaN (NotANumber) as an
$f64
. 
pi

Pi as an
$f64
.
Functions

abs(x)

Returns the absolute value of
x
, wherex
is an$i64
or an$f64
. The output type is the same as the input type. 
acos(x)

Returns the arc cosine of
x
in radians as an$f64
. The argument can be an$f64
or an$i64
which will be automatically converted into an$f64
. 
asin(x)

Returns the arc sine of
x
in radians as an$f64
. The argument can be an$f64
or an$i64
which will be automatically converted into an$f64
. 
atan(x)

Returns the arc tangent of
x
in radians as an$f64
. The argument can be an$f64
or an$i64
which will be automatically converted into an$f64
. 
atan2(y, x)

Returns the arc tangent of
y/x
in radians as an$f64
using the signs of the arguments to determine the correct quadrant. Each argument can be an$f64
or an$i64
which will be automatically converted into an$f64
. 
cbrt(x)

Returns the cubic root of
x
as an$f64
. The argument can be an$f64
or an$i64
which will be automatically converted into an$f64
. 
ceil(x)

Returns as an
$f64
the lowest integer value greater than or equal tox
. The argument can be an$f64
or an$i64
which will be automatically converted into an$f64
. 
cos(x)

Returns the cosine of
x
as an$f64
, wherex
is in radians. The argument can be an$f64
or an$i64
which will be automatically converted into an$f64
. 
exp(x)

Returns
e
to the power ofx
as an$f64
. The argument can be an$f64
or an$i64
which will be automatically converted into an$f64
. 
floor(x)

Returns as an
$f64
the highest integer value less than or equal tox
. The argument can be an$f64
or an$i64
which will be automatically converted into an$f64
. 
ln(x)

Returns the natural logarithm (i.e. the basee logarithm) of
x
as an$f64
. The argument can be an$f64
or an$i64
which will be automatically converted into an$f64
. 
log(b, x)

Returns the base
b
logarithm ofx
as an$f64
. Each argument can be an$f64
or an$i64
which will be automatically converted into an$f64
. 
log2(x)

Returns the base2 logarithm of
x
as an$f64
. The argument can be an$f64
or an$i64
which will be automatically converted into an$f64
. 
log10(x)

Returns the base10 logarithm of
x
as an$f64
. The argument can be an$f64
or an$i64
which will be automatically converted into an$f64
. 
sin(x)

Returns the sine of
x
as an$f64
, wherex
is in radians. The argument can be an$f64
or an$i64
which will be automatically converted into an$f64
. 
sqrt(x)

Returns the square root of
x
as an$f64
. The argument can be an$f64
or an$i64
which will be automatically converted into an$f64
. 
tan(x)

Returns the tangent of
x
as an$f64
, wherex
is in radians. The argument can be an$f64
or an$i64
which will be automatically converted into an$f64
.