Uses old Rust 2015
0.0.1 |
|
---|
#31 in #floats
7KB
126 lines
NMBR Float
Float provides an interface for working with floating point numbers, currently 64 and 32 bit.
trait FloatingPoint
/// Returns the `NaN` value
fn nan() -> Self;
/// Returns Infinity
fn infinity() -> Self;
/// Returns -Infinity
fn neg_infinity() -> Self;
/// Returns true if the float is NaN
fn is_nan(self) -> bool;
/// Returns true if the float is positive or negative infinity
fn is_infinite(self) -> bool;
/// Returns true if the number is not NaN and not infinity
fn is_finite(self) -> bool;
/// Returns true if the number is not zero, infinite, denormal or NaN.
fn is_normal(self) -> bool;
/// Returns the category this number belongs to
fn classify(self) -> FpCategory;