Expand description
An alias for a floating-point value that represents a real number.
The prefix “R” for “real” is used instead of “F” for “finite”, because if
“F” were used, then this name would be very similar to f64
,
differentiated only by capitalization.
Trait Implementations
sourceimpl Real for R64
impl Real for R64
sourcefn max_value() -> Self
fn max_value() -> Self
Returns the largest finite value that this type can represent. Read more
sourcefn min_value() -> Self
fn min_value() -> Self
Returns the smallest finite value that this type can represent. Read more
sourcefn min_positive_value() -> Self
fn min_positive_value() -> Self
Returns the smallest positive, normalized value that this type can represent. Read more
sourcefn is_sign_positive(self) -> bool
fn is_sign_positive(self) -> bool
Returns
true
if self
is positive, including +0.0
,
Float::infinity()
, and with newer versions of Rust f64::NAN
. Read moresourcefn is_sign_negative(self) -> bool
fn is_sign_negative(self) -> bool
Returns
true
if self
is negative, including -0.0
,
Float::neg_infinity()
, and with newer versions of Rust -f64::NAN
. Read moresourcefn ceil(self) -> Self
fn ceil(self) -> Self
Returns the smallest integer greater than or equal to a number. Read more
sourcefn round(self) -> Self
fn round(self) -> Self
Returns the nearest integer to a number. Round half-way cases away from
0.0
. Read moresourcefn mul_add(self, a: Self, b: Self) -> Self
fn mul_add(self, a: Self, b: Self) -> Self
Fused multiply-add. Computes
(self * a) + b
with only one rounding
error, yielding a more accurate result than an unfused multiply-add. Read moresourcefn exp_m1(self) -> Self
fn exp_m1(self) -> Self
Returns
e^(self) - 1
in a way that is accurate even if the
number is close to zero. Read moresourcefn log(self, base: Self) -> Self
fn log(self, base: Self) -> Self
Returns the logarithm of the number with respect to an arbitrary base. Read more
sourcefn to_degrees(self) -> Self
fn to_degrees(self) -> Self
Converts radians to degrees. Read more
sourcefn to_radians(self) -> Self
fn to_radians(self) -> Self
Converts degrees to radians. Read more
sourcefn ln_1p(self) -> Self
fn ln_1p(self) -> Self
Returns
ln(1+n)
(natural logarithm) more accurately than if
the operations were performed separately. Read moresourcefn hypot(self, other: Self) -> Self
fn hypot(self, other: Self) -> Self
Calculate the length of the hypotenuse of a right-angle triangle given
legs of length
x
and y
. Read moresourcefn asin(self) -> Self
fn asin(self) -> Self
Computes the arcsine of a number. Return value is in radians in
the range [-pi/2, pi/2] or NaN if the number is outside the range
[-1, 1]. Read more
sourcefn acos(self) -> Self
fn acos(self) -> Self
Computes the arccosine of a number. Return value is in radians in
the range [0, pi] or NaN if the number is outside the range
[-1, 1]. Read more
sourcefn atan(self) -> Self
fn atan(self) -> Self
Computes the arctangent of a number. Return value is in radians in the
range [-pi/2, pi/2]; Read more