Trait honestintervals::fp::Float [] [src]

pub trait Float: From<f64> + FromStr + Clone + Display + Into<f64> + PartialOrd + From<f64> + FromStr + Neg<Output = Self> + Abs + Add + Sub + Mul + Div + MinMax + Transc {
    fn zero(precision: usize) -> Self;
    fn neg_zero(precision: usize) -> Self;
    fn one(precision: usize) -> Self;
    fn infinity(precision: usize) -> Self;
    fn neg_infinity(precision: usize) -> Self;
    fn nan(precision: usize) -> Self;
    fn sign(&self) -> Sign;
    fn precision(&self) -> usize;
    fn is_finite(&self) -> bool;
    fn is_infinite(&self) -> bool;
    fn is_zero(&self) -> bool;
    fn is_infinity(&self) -> bool;
    fn is_neg_infinity(&self) -> bool;
    fn is_nan(&self) -> bool;
}

All-encapsulating trait for finite precision floats.

Required Methods

Constructs a float representing zero.

Constructs a float representing negative zero.

Constructs a float representing one.

Constructs a float representing positive infinity.

Constructs a float representing negative infinity.

Constructs a float representing NaN.

Returns the sign of self.

Returns the precision of self.

Whether self is a regular number (non-infinity and non-NaN).

Whether self is either positive infinity or negative infinity.

Whether self is zero (or negative zero).

Whether self is positive infinity.

Whether self is negative infinity.

Whether self is NaN.

Implementors