pub type N32 = NotNan<f32>;Expand description
32-bit floating-point representation that cannot be NaN.
Aliased Type§
struct N32 { /* private fields */ }Trait Implementations§
Source§impl Real for N32
impl Real for N32
Source§fn max_value() -> Self
fn max_value() -> Self
Returns the largest finite value that this type can represent. Read more
Source§fn min_value() -> Self
fn min_value() -> Self
Returns the smallest finite value that this type can represent. Read more
Source§fn min_positive_value() -> Self
fn min_positive_value() -> Self
Returns the smallest positive, normalized value that this type can represent. Read more
Source§fn 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 moreSource§fn 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 moreSource§fn ceil(self) -> Self
fn ceil(self) -> Self
Returns the smallest integer greater than or equal to a number. Read more
Source§fn round(self) -> Self
fn round(self) -> Self
Returns the nearest integer to a number. Round half-way cases away from
0.0. Read moreSource§fn 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 moreSource§fn 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 moreSource§fn 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
Source§fn to_degrees(self) -> Self
fn to_degrees(self) -> Self
Converts radians to degrees. Read more
Source§fn to_radians(self) -> Self
fn to_radians(self) -> Self
Converts degrees to radians. Read more
Source§fn 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 moreSource§fn 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 moreSource§fn 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
Source§fn 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
Source§fn 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