Expand description
64-bit floating-point representation that must be 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
.
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 more
sourcefn 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 more
sourcefn abs(self) -> Self
fn abs(self) -> Self
Computes the absolute value of self
. Returns Float::nan()
if the
number is Float::nan()
. Read more
sourcefn 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 more
sourcefn 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 more
sourcefn 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 more
sourcefn 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 more
sourcefn 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 more
sourcefn 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
sourcefn atan2(self, other: Self) -> Self
fn atan2(self, other: Self) -> Self
Computes the four quadrant arctangent of self
(y
) and other
(x
). Read more