Operations and constants for float
NaN
infinity
neg_infinity
num of num::num for float
abs
abs_sub
acos
add
asin
atan
atan2
cbrt
ceil
copysign
cos
cosh
div
eq
erf
erfc
exp
exp2
expm1
floor
fmax
fmin
frexp
from_str
- Convert a string to a floatgt
hypot
ilog_radix
is_NaN
is_finite
is_infinite
is_negative
is_nonnegative
is_nonpositive
is_positive
is_zero
j0
j1
jn
ldexp
le
lgamma
ln
ln1p
log10
log2
log_radix
logarithm
lt
modf
mul
mul_add
ne
nextafter
pow
pow_with_uint
- Section: Arithmeticsrem
round
signbit
sin
sinh
sqrt
sub
tan
tanh
tgamma
to_str
- Converts a float to a string with a maximum number of significant digitsto_str_common
- Section: String Conversionsto_str_exact
- Converts a float to a string with exactly the number of provided significant digitstrunc
y0
y1
yn
float::consts
NaN
float
infinity
float
neg_infinity
float
num of num::num for float
add
fn add(&&other: float) -> float
sub
fn sub(&&other: float) -> float
mul
fn mul(&&other: float) -> float
div
fn div(&&other: float) -> float
modulo
fn modulo(&&other: float) -> float
neg
fn neg() -> float
to_int
fn to_int() -> int
from_int
fn from_int(n: int) -> float
abs
fn abs(x: float) -> float
abs_sub
pure fn abs_sub(a: c_double, b: c_double) -> c_double
acos
pure fn acos(n: c_double) -> c_double
add
pure fn add(x: f64, y: f64) -> f64
asin
pure fn asin(n: c_double) -> c_double
atan
fn atan(x: float) -> float
atan2
pure fn atan2(a: c_double, b: c_double) -> c_double
cbrt
pure fn cbrt(n: c_double) -> c_double
ceil
pure fn ceil(n: c_double) -> c_double
copysign
pure fn copysign(x: c_double, y: c_double) -> c_double
cos
fn cos(x: float) -> float
cosh
pure fn cosh(n: c_double) -> c_double
div
pure fn div(x: f64, y: f64) -> f64
eq
pure fn eq(x: f64, y: f64) -> bool
erf
pure fn erf(n: c_double) -> c_double
erfc
pure fn erfc(n: c_double) -> c_double
exp
pure fn exp(n: c_double) -> c_double
exp2
pure fn exp2(n: c_double) -> c_double
expm1
pure fn expm1(n: c_double) -> c_double
floor
pure fn floor(n: c_double) -> c_double
fmax
pure fn fmax(a: c_double, b: c_double) -> c_double
fmin
pure fn fmin(a: c_double, b: c_double) -> c_double
frexp
pure fn frexp(n: c_double, &value: c_int) -> c_double
from_str
fn from_str(num: str) -> option<float>
Convert a string to a float
This function accepts strings such as
Leading and trailing whitespace are ignored.
none
if the string did not represent a valid number. Otherwise, some(n)
where n
is the floating-point number represented by [num]/~
.
gt
pure fn gt(x: f64, y: f64) -> bool
hypot
pure fn hypot(x: c_double, y: c_double) -> c_double
ilog_radix
pure fn ilog_radix(n: c_double) -> c_int
is_NaN
fn is_NaN(x: float) -> bool
is_finite
fn is_finite(x: float) -> bool
is_infinite
fn is_infinite(x: float) -> bool
is_negative
fn is_negative(x: float) -> bool
is_nonnegative
fn is_nonnegative(x: float) -> bool
is_nonpositive
fn is_nonpositive(x: float) -> bool
is_positive
fn is_positive(x: float) -> bool
is_zero
fn is_zero(x: float) -> bool
j0
pure fn j0(n: c_double) -> c_double
j1
pure fn j1(n: c_double) -> c_double
jn
pure fn jn(i: c_int, n: c_double) -> c_double
ldexp
pure fn ldexp(x: c_double, n: c_int) -> c_double
le
pure fn le(x: f64, y: f64) -> bool
lgamma
pure fn lgamma(n: c_double, &sign: c_int) -> c_double
ln
pure fn ln(n: c_double) -> c_double
ln1p
pure fn ln1p(n: c_double) -> c_double
log10
pure fn log10(n: c_double) -> c_double
log2
pure fn log2(n: c_double) -> c_double
log_radix
pure fn log_radix(n: c_double) -> c_double
logarithm
pure fn logarithm(n: f64, b: f64) -> f64
lt
pure fn lt(x: f64, y: f64) -> bool
modf
pure fn modf(n: c_double, &iptr: c_double) -> c_double
mul
pure fn mul(x: f64, y: f64) -> f64
mul_add
pure fn mul_add(a: c_double, b: c_double, c: c_double) -> c_double
ne
pure fn ne(x: f64, y: f64) -> bool
nextafter
pure fn nextafter(x: c_double, y: c_double) -> c_double
pow
pure fn pow(n: c_double, e: c_double) -> c_double
pow_with_uint
fn pow_with_uint(base: uint, pow: uint) -> float
Section: Arithmetics
rem
pure fn rem(x: f64, y: f64) -> f64
round
pure fn round(n: c_double) -> c_double
signbit
pure fn signbit(x: f64) -> int
sin
fn sin(x: float) -> float
sinh
pure fn sinh(n: c_double) -> c_double
sqrt
fn sqrt(x: float) -> float
sub
pure fn sub(x: f64, y: f64) -> f64
tan
fn tan(x: float) -> float
tanh
pure fn tanh(n: c_double) -> c_double
tgamma
pure fn tgamma(n: c_double) -> c_double
to_str
fn to_str(num: float, digits: uint) -> str
Converts a float to a string with a maximum number of significant digits
to_str_common
fn to_str_common(num: float, digits: uint, exact: bool) -> str
Section: String Conversions
to_str_exact
fn to_str_exact(num: float, digits: uint) -> str
Converts a float to a string with exactly the number of provided significant digits
trunc
pure fn trunc(n: c_double) -> c_double
y0
pure fn y0(n: c_double) -> c_double
y1
pure fn y1(n: c_double) -> c_double
yn
pure fn yn(i: c_int, n: c_double) -> c_double