pub struct DoubleFloat<F>(F, F);

Tuple Fields§

§0: F§1: F

Trait Implementations§

source§

impl<F> Add<DoubleFloat<F>> for DoubleFloat<F>where Self: Float,

§

type Output = StatusAnd<DoubleFloat<F>>

The resulting type after applying the + operator.
source§

fn add(self, rhs: Self) -> StatusAnd<Self>

Performs the + operation. Read more
source§

impl<F> AddAssign<DoubleFloat<F>> for DoubleFloat<F>where Self: Float,

source§

fn add_assign(&mut self, rhs: Self)

Performs the += operation. Read more
source§

impl<F: Clone> Clone for DoubleFloat<F>

source§

fn clone(&self) -> DoubleFloat<F>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<F: Debug> Debug for DoubleFloat<F>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<F> Default for DoubleFloat<F>where Self: Float,

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl<F: FloatConvert<IeeeFloat<FallbackS<F>>>> Display for DoubleFloat<F>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<F> Div<DoubleFloat<F>> for DoubleFloat<F>where Self: Float,

§

type Output = StatusAnd<DoubleFloat<F>>

The resulting type after applying the / operator.
source§

fn div(self, rhs: Self) -> StatusAnd<Self>

Performs the / operation. Read more
source§

impl<F> DivAssign<DoubleFloat<F>> for DoubleFloat<F>where Self: Float,

source§

fn div_assign(&mut self, rhs: Self)

Performs the /= operation. Read more
source§

impl<F: FloatConvert<IeeeFloat<FallbackS<F>>>> Float for DoubleFloat<F>where Self: From<IeeeFloat<FallbackS<F>>>,

source§

const BITS: usize = _

Total number of bits in the in-memory format.
source§

const PRECISION: usize = Fallback<F>::PRECISION

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

const MAX_EXP: ExpInt = Fallback<F>::MAX_EXP

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

const MIN_EXP: ExpInt = Fallback<F>::MIN_EXP

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

const ZERO: Self = _

Positive Zero.
source§

const INFINITY: Self = _

Positive Infinity.
source§

const NAN: Self = _

NaN (Not a Number).
source§

fn qnan(payload: Option<u128>) -> Self

Factory for QNaN values.
source§

fn snan(payload: Option<u128>) -> Self

Factory for SNaN values.
source§

fn largest() -> Self

Largest finite number.
source§

const SMALLEST: Self = _

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

fn smallest_normalized() -> Self

Smallest (by magnitude) normalized finite number.
source§

fn add_r(self, rhs: Self, round: Round) -> StatusAnd<Self>

source§

fn mul_r(self, rhs: Self, round: Round) -> StatusAnd<Self>

source§

fn mul_add_r( self, multiplicand: Self, addend: Self, round: Round ) -> StatusAnd<Self>

source§

fn div_r(self, rhs: Self, round: Round) -> StatusAnd<Self>

source§

fn c_fmod(self, rhs: Self) -> StatusAnd<Self>

C fmod, or llvm frem.
source§

fn round_to_integral(self, round: Round) -> StatusAnd<Self>

source§

fn next_up(self) -> StatusAnd<Self>

IEEE-754R 2008 5.3.1: nextUp.
source§

fn from_bits(input: u128) -> Self

source§

fn from_u128_r(input: u128, round: Round) -> StatusAnd<Self>

source§

fn from_str_r(s: &str, round: Round) -> Result<StatusAnd<Self>, ParseError>

source§

fn to_bits(self) -> u128

source§

fn to_u128_r( self, width: usize, round: Round, is_exact: &mut bool ) -> StatusAnd<u128>

source§

fn cmp_abs_normal(self, rhs: Self) -> Ordering

source§

fn bitwise_eq(self, rhs: Self) -> bool

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

fn is_negative(self) -> bool

IEEE-754R isSignMinus: Returns whether the current value is negative. Read more
source§

fn is_denormal(self) -> bool

IEEE-754R isSubnormal(): Returns whether the float is a denormal.
source§

fn is_signaling(self) -> bool

Returns true if the float is a signaling NaN.
source§

fn category(self) -> Category

source§

fn get_exact_inverse(self) -> Option<Self>

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

fn ilogb(self) -> ExpInt

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

fn scalbn_r(self, exp: ExpInt, round: Round) -> Self

Returns: self * 2exp for integral exponents. Equivalent to C standard library function ldexp.
source§

fn frexp_r(self, exp: &mut ExpInt, round: Round) -> Self

Equivalent to C standard library function with the same name. Read more
source§

fn sub_r(self, rhs: Self, round: Round) -> StatusAnd<Self>

source§

fn mul_add(self, multiplicand: Self, addend: Self) -> StatusAnd<Self>

source§

fn ieee_rem(self, rhs: Self) -> StatusAnd<Self>

IEEE remainder.
source§

fn next_down(self) -> StatusAnd<Self>

IEEE-754R 2008 5.3.1: nextDown. Read more
source§

fn abs(self) -> Self

source§

fn copy_sign(self, rhs: Self) -> Self

source§

fn from_i128_r(input: i128, round: Round) -> StatusAnd<Self>

source§

fn from_i128(input: i128) -> StatusAnd<Self>

source§

fn from_u128(input: u128) -> StatusAnd<Self>

source§

fn to_i128_r( self, width: usize, round: Round, is_exact: &mut bool ) -> StatusAnd<i128>

Converts 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
source§

fn to_i128(self, width: usize) -> StatusAnd<i128>

source§

fn to_u128(self, width: usize) -> StatusAnd<u128>

source§

fn min(self, other: Self) -> Self

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.
source§

fn max(self, other: Self) -> Self

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.
source§

fn is_normal(self) -> bool

IEEE-754R isNormal: Returns whether the current value is normal. Read more
source§

fn is_finite(self) -> bool

Returns true if the current value is zero, subnormal, or normal. Read more
source§

fn is_zero(self) -> bool

Returns true if the float is plus or minus zero.
source§

fn is_infinite(self) -> bool

IEEE-754R isInfinite(): Returns whether the float is infinity.
source§

fn is_nan(self) -> bool

Returns true if the float is a quiet or signaling NaN.
source§

fn is_non_zero(self) -> bool

source§

fn is_finite_non_zero(self) -> bool

source§

fn is_pos_zero(self) -> bool

source§

fn is_neg_zero(self) -> bool

source§

fn is_smallest(self) -> bool

Returns true if the number has the smallest possible non-zero magnitude in the current semantics.
source§

fn is_largest(self) -> bool

Returns true if the number has the largest possible finite magnitude in the current semantics.
source§

fn is_integer(self) -> bool

Returns true if the number is an exact integer.
source§

fn scalbn(self, exp: ExpInt) -> Self

source§

fn frexp(self, exp: &mut ExpInt) -> Self

source§

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

source§

fn from(DoubleFloat: DoubleFloat<F>) -> Self

Converts to this type from the input type.
source§

impl<F> From<IeeeFloat<FallbackS<F>>> for DoubleFloat<F>where F: FloatConvert<IeeeFloat<FallbackExtendedS<F>>> + Float, IeeeFloat<FallbackExtendedS<F>>: FloatConvert<F>,

source§

fn from(x: IeeeFloat<FallbackS<F>>) -> Self

Converts to this type from the input type.
source§

impl<F> FromStr for DoubleFloat<F>where Self: Float,

§

type Err = ParseError

The associated error which can be returned from parsing.
source§

fn from_str(s: &str) -> Result<Self, ParseError>

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

impl<F> Mul<DoubleFloat<F>> for DoubleFloat<F>where Self: Float,

§

type Output = StatusAnd<DoubleFloat<F>>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Self) -> StatusAnd<Self>

Performs the * operation. Read more
source§

impl<F> MulAssign<DoubleFloat<F>> for DoubleFloat<F>where Self: Float,

source§

fn mul_assign(&mut self, rhs: Self)

Performs the *= operation. Read more
source§

impl<F: Float> Neg for DoubleFloat<F>

§

type Output = DoubleFloat<F>

The resulting type after applying the - operator.
source§

fn neg(self) -> Self

Performs the unary - operation. Read more
source§

impl<F: PartialEq> PartialEq<DoubleFloat<F>> for DoubleFloat<F>

source§

fn eq(&self, other: &DoubleFloat<F>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<F: PartialOrd> PartialOrd<DoubleFloat<F>> for DoubleFloat<F>

source§

fn partial_cmp(&self, other: &DoubleFloat<F>) -> Option<Ordering>

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

fn lt(&self, other: &Rhs) -> bool

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

fn le(&self, other: &Rhs) -> bool

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

fn gt(&self, other: &Rhs) -> bool

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

fn ge(&self, other: &Rhs) -> bool

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

impl<F> Rem<DoubleFloat<F>> for DoubleFloat<F>where Self: Float,

§

type Output = StatusAnd<DoubleFloat<F>>

The resulting type after applying the % operator.
source§

fn rem(self, rhs: Self) -> StatusAnd<Self>

Performs the % operation. Read more
source§

impl<F> RemAssign<DoubleFloat<F>> for DoubleFloat<F>where Self: Float,

source§

fn rem_assign(&mut self, rhs: Self)

Performs the %= operation. Read more
source§

impl<F> Sub<DoubleFloat<F>> for DoubleFloat<F>where Self: Float,

§

type Output = StatusAnd<DoubleFloat<F>>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: Self) -> StatusAnd<Self>

Performs the - operation. Read more
source§

impl<F> SubAssign<DoubleFloat<F>> for DoubleFloat<F>where Self: Float,

source§

fn sub_assign(&mut self, rhs: Self)

Performs the -= operation. Read more
source§

impl<F: Copy> Copy for DoubleFloat<F>

source§

impl<F> StructuralPartialEq for DoubleFloat<F>

Auto Trait Implementations§

§

impl<F> RefUnwindSafe for DoubleFloat<F>where F: RefUnwindSafe,

§

impl<F> Send for DoubleFloat<F>where F: Send,

§

impl<F> Sync for DoubleFloat<F>where F: Sync,

§

impl<F> Unpin for DoubleFloat<F>where F: Unpin,

§

impl<F> UnwindSafe for DoubleFloat<F>where F: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for Twhere T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.

Layout§

Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.