[][src]Enum simple_soft_float::FloatClass

#[repr(u8)]
pub enum FloatClass {
    NegativeInfinity,
    NegativeNormal,
    NegativeSubnormal,
    NegativeZero,
    PositiveInfinity,
    PositiveNormal,
    PositiveSubnormal,
    PositiveZero,
    QuietNaN,
    SignalingNaN,
}

float classification

Variants

NegativeInfinity

negative infinity

NegativeNormal

negative normal

NegativeSubnormal

negative subnormal

NegativeZero

negative zero

PositiveInfinity

positive infinity

PositiveNormal

positive normal

PositiveSubnormal

positive subnormal

PositiveZero

positive zero

QuietNaN

quiet NaN

SignalingNaN

signaling NaN

Methods

impl FloatClass[src]

pub fn sign(self) -> Option<Sign>[src]

get sign of non-NaN values

pub fn abs(self) -> Self[src]

convert negative to positive

pub fn is_negative_infinity(self) -> bool[src]

return true if self is NegativeInfinity

pub fn is_negative_normal(self) -> bool[src]

return true if self is NegativeNormal

pub fn is_negative_subnormal(self) -> bool[src]

return true if self is NegativeSubnormal

pub fn is_negative_zero(self) -> bool[src]

return true if self is NegativeZero

pub fn is_positive_infinity(self) -> bool[src]

return true if self is PositiveInfinity

pub fn is_positive_normal(self) -> bool[src]

return true if self is PositiveNormal

pub fn is_positive_subnormal(self) -> bool[src]

return true if self is PositiveSubnormal

pub fn is_positive_zero(self) -> bool[src]

return true if self is PositiveZero

pub fn is_quiet_nan(self) -> bool[src]

return true if self is QuietNaN

pub fn is_signaling_nan(self) -> bool[src]

return true if self is SignalingNaN

pub fn is_infinity(self) -> bool[src]

return true if self is infinity

pub fn is_normal(self) -> bool[src]

return true if self is NegativeNormal or PositiveNormal

pub fn is_subnormal(self) -> bool[src]

return true if self is subnormal

pub fn is_zero(self) -> bool[src]

return true if self is zero

pub fn is_nan(self) -> bool[src]

return true if self is NaN

pub fn is_finite(self) -> bool[src]

return true if self is finite (not NaN or infinity)

pub fn is_subnormal_or_zero(self) -> bool[src]

return true if self is subnormal or zero

Trait Implementations

impl Clone for FloatClass[src]

impl Copy for FloatClass[src]

impl Debug for FloatClass[src]

impl Eq for FloatClass[src]

impl Hash for FloatClass[src]

impl Neg for FloatClass[src]

type Output = Self

The resulting type after applying the - operator.

impl PartialEq<FloatClass> for FloatClass[src]

impl StructuralEq for FloatClass[src]

impl StructuralPartialEq for FloatClass[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.