Struct rustc_apfloat::ieee::IeeeFloat[][src]

#[must_use]
pub struct IeeeFloat<S> { /* fields omitted */ }

Trait Implementations

impl<S> Copy for IeeeFloat<S>
[src]

impl<S> Clone for IeeeFloat<S>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<S> Default for IeeeFloat<S> where
    Self: Float
[src]

Returns the "default value" for a type. Read more

impl<S> FromStr for IeeeFloat<S> where
    Self: Float
[src]

The associated error which can be returned from parsing.

Parses a string s to return a value of this type. Read more

impl<S> Add for IeeeFloat<S> where
    Self: Float
[src]

The resulting type after applying the + operator.

Performs the + operation.

impl<S> Sub for IeeeFloat<S> where
    Self: Float
[src]

The resulting type after applying the - operator.

Performs the - operation.

impl<S> Mul for IeeeFloat<S> where
    Self: Float
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl<S> Div for IeeeFloat<S> where
    Self: Float
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl<S> Rem for IeeeFloat<S> where
    Self: Float
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl<S> AddAssign for IeeeFloat<S> where
    Self: Float
[src]

Performs the += operation.

impl<S> SubAssign for IeeeFloat<S> where
    Self: Float
[src]

Performs the -= operation.

impl<S> MulAssign for IeeeFloat<S> where
    Self: Float
[src]

Performs the *= operation.

impl<S> DivAssign for IeeeFloat<S> where
    Self: Float
[src]

Performs the /= operation.

impl<S> RemAssign for IeeeFloat<S> where
    Self: Float
[src]

Performs the %= operation.

impl<S: Semantics> PartialEq for IeeeFloat<S>
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<S: Semantics> PartialOrd for IeeeFloat<S>
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<S> Neg for IeeeFloat<S>
[src]

The resulting type after applying the - operator.

Performs the unary - operation.

impl<S: Semantics> Display for IeeeFloat<S>
[src]

Prints this value as a decimal string.

\param precision The maximum number of digits of precision to output. If there are fewer digits available, zero padding will not be used unless the value is integral and small enough to be expressed in precision digits. 0 means to use the natural precision of the number. \param width The maximum number of zeros to consider inserting before falling back to scientific notation. 0 means to always use scientific notation.

\param alternate Indicate whether to remove the trailing zero in fraction part or not. Also setting this parameter to true forces producing of output more similar to default printf behavior. Specifically the lower e is used as exponent delimiter and exponent always contains no less than two digits.

Number precision width Result


1.01E+4 5 2 10100 1.01E+4 4 2 1.01E+4 1.01E+4 5 1 1.01E+4 1.01E-2 5 2 0.0101 1.01E-2 4 2 0.0101 1.01E-2 4 1 1.01E-2

Formats the value using the given formatter. Read more

impl<S: Semantics> Debug for IeeeFloat<S>
[src]

Formats the value using the given formatter. Read more

impl<S: Semantics> Float for IeeeFloat<S>
[src]

BITS: usize = <S>::BITS

Total number of bits in the in-memory format.

PRECISION: usize = <S>::PRECISION

Number of bits in the significand. This includes the integer bit.

MAX_EXP: ExpInt = <S>::MAX_EXP

The largest E such that 2E is representable; this matches the definition of IEEE 754. Read more

MIN_EXP: ExpInt = <S>::MIN_EXP

The smallest E such that 2E is a normalized number; this matches the definition of IEEE 754. Read more

ZERO: Self = IeeeFloat{sig: [0],
          exp: <S>::MIN_EXP - 1,
          category: Category::Zero,
          sign: false,
          marker: PhantomData,}

Positive Zero.

INFINITY: Self = IeeeFloat{sig: [0],
          exp: <S>::MAX_EXP + 1,
          category: Category::Infinity,
          sign: false,
          marker: PhantomData,}

Positive Infinity.

NAN: Self = IeeeFloat{sig: [<S>::QNAN_SIGNIFICAND],
          exp: <S>::MAX_EXP + 1,
          category: Category::NaN,
          sign: false,
          marker: PhantomData,}

NaN (Not a Number).

Factory for QNaN values.

Factory for SNaN values.

Largest finite number.

SMALLEST: Self = IeeeFloat{sig: [1],
          exp: <S>::MIN_EXP,
          category: Category::Normal,
          sign: false,
          marker: PhantomData,}

Smallest (by magnitude) finite number. Might be denormalized, which implies a relative loss of precision. Read more

Smallest (by magnitude) normalized finite number.

C fmod, or llvm frem.

IEEE-754R 2008 5.3.1: nextUp.

Bitwise comparison for equality (QNaNs compare equal, 0!=-0).

IEEE-754R isSignMinus: Returns true if and only if the current value is negative. Read more

IEEE-754R isSubnormal(): Returns true if and only if the float is a denormal. Read more

Returns true if and only if the float is a signaling NaN.

If this value has an exact multiplicative inverse, return it.

Returns the exponent of the internal representation of the Float. Read more

Returns: self * 2exp for integral exponents.

Equivalent of C standard library function. Read more

IEEE remainder.

IEEE-754R 2008 5.3.1: nextDown. Read more

Convert a floating point number to an integer according to the rounding mode. In case of an invalid operation exception, deterministic values are returned, namely zero for NaNs and the minimal or maximal value respectively for underflow or overflow. If the rounded value is in range but the floating point number is not the exact integer, the C standard doesn't require an inexact exception to be raised. IEEE-854 does require it so we do that. Read more

Implements IEEE minNum semantics. Returns the smaller of the 2 arguments if both are not NaN. If either argument is a NaN, returns the other argument. Read more

Implements IEEE maxNum semantics. Returns the larger of the 2 arguments if both are not NaN. If either argument is a NaN, returns the other argument. Read more

IEEE-754R isNormal: Returns true if and only if the current value is normal. Read more

Returns true if and only if the current value is zero, subnormal, or normal. Read more

Returns true if and only if the float is plus or minus zero.

IEEE-754R isInfinite(): Returns true if and only if the float is infinity.

Returns true if and only if the float is a quiet or signaling NaN.

Returns true if and only if the number has the smallest possible non-zero magnitude in the current semantics. Read more

Returns true if and only if the number has the largest possible finite magnitude in the current semantics. Read more

Returns true if and only if the number is an exact integer.

impl<S: Semantics, T: Semantics> FloatConvert<IeeeFloat<T>> for IeeeFloat<S>
[src]

Convert a value of one floating point type to another. The return value corresponds to the IEEE754 exceptions. *loses_info records whether the transformation lost information, i.e. whether converting the result back to the original type will produce the original value (this is almost the same as return value==Status::OK, but there are edge cases where this is not so). Read more

impl<F: Float> From<IeeeFloat<FallbackS<F>>> for DoubleFloat<F> where
    F: FloatConvert<IeeeFloat<FallbackExtendedS<F>>>,
    IeeeFloat<FallbackExtendedS<F>>: FloatConvert<F>, 
[src]

Performs the conversion.

impl<F: FloatConvert<Self>> From<DoubleFloat<F>> for IeeeFloat<FallbackS<F>>
[src]

Performs the conversion.

Auto Trait Implementations

impl<S> Send for IeeeFloat<S> where
    S: Send

impl<S> Sync for IeeeFloat<S> where
    S: Sync