Struct rustc_apfloat::ppc::DoubleFloat
source · 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,
impl<F> Add<DoubleFloat<F>> for DoubleFloat<F>where
Self: Float,
source§impl<F> AddAssign<DoubleFloat<F>> for DoubleFloat<F>where
Self: Float,
impl<F> AddAssign<DoubleFloat<F>> for DoubleFloat<F>where
Self: Float,
source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+=
operation. Read moresource§impl<F: Clone> Clone for DoubleFloat<F>
impl<F: Clone> Clone for DoubleFloat<F>
source§fn clone(&self) -> DoubleFloat<F>
fn clone(&self) -> DoubleFloat<F>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<F: Debug> Debug for DoubleFloat<F>
impl<F: Debug> Debug for DoubleFloat<F>
source§impl<F> Default for DoubleFloat<F>where
Self: Float,
impl<F> Default for DoubleFloat<F>where
Self: Float,
source§impl<F: FloatConvert<IeeeFloat<FallbackS<F>>>> Display for DoubleFloat<F>
impl<F: FloatConvert<IeeeFloat<FallbackS<F>>>> Display for DoubleFloat<F>
source§impl<F> Div<DoubleFloat<F>> for DoubleFloat<F>where
Self: Float,
impl<F> Div<DoubleFloat<F>> for DoubleFloat<F>where
Self: Float,
source§impl<F> DivAssign<DoubleFloat<F>> for DoubleFloat<F>where
Self: Float,
impl<F> DivAssign<DoubleFloat<F>> for DoubleFloat<F>where
Self: Float,
source§fn div_assign(&mut self, rhs: Self)
fn div_assign(&mut self, rhs: Self)
Performs the
/=
operation. Read moresource§impl<F: FloatConvert<IeeeFloat<FallbackS<F>>>> Float for DoubleFloat<F>where
Self: From<IeeeFloat<FallbackS<F>>>,
impl<F: FloatConvert<IeeeFloat<FallbackS<F>>>> Float for DoubleFloat<F>where
Self: From<IeeeFloat<FallbackS<F>>>,
source§const PRECISION: usize = Fallback<F>::PRECISION
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
const MAX_EXP: ExpInt = Fallback<F>::MAX_EXP
The largest E such that 2E is representable; this matches the
definition of IEEE 754. Read more
source§const MIN_EXP: ExpInt = Fallback<F>::MIN_EXP
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. Read more
source§const SMALLEST: Self = _
const SMALLEST: Self = _
Smallest (by magnitude) finite number.
Might be denormalized, which implies a relative loss of precision. Read more
source§fn smallest_normalized() -> Self
fn smallest_normalized() -> Self
Smallest (by magnitude) normalized finite number.
fn add_r(self, rhs: Self, round: Round) -> StatusAnd<Self>
fn mul_r(self, rhs: Self, round: Round) -> StatusAnd<Self>
fn mul_add_r(
self,
multiplicand: Self,
addend: Self,
round: Round
) -> StatusAnd<Self>
fn div_r(self, rhs: Self, round: Round) -> StatusAnd<Self>
fn round_to_integral(self, round: Round) -> StatusAnd<Self>
fn from_bits(input: u128) -> Self
fn from_u128_r(input: u128, round: Round) -> StatusAnd<Self>
fn from_str_r(s: &str, round: Round) -> Result<StatusAnd<Self>, ParseError>
fn to_bits(self) -> u128
fn to_u128_r(
self,
width: usize,
round: Round,
is_exact: &mut bool
) -> StatusAnd<u128>
fn cmp_abs_normal(self, rhs: Self) -> Ordering
source§fn bitwise_eq(self, rhs: Self) -> bool
fn bitwise_eq(self, rhs: Self) -> bool
Bitwise comparison for equality (QNaNs compare equal, 0!=-0).
source§fn is_negative(self) -> bool
fn is_negative(self) -> bool
IEEE-754R isSignMinus: Returns whether the current value is
negative. Read more
source§fn is_denormal(self) -> bool
fn is_denormal(self) -> bool
IEEE-754R isSubnormal(): Returns whether the float is a
denormal. Read more
source§fn is_signaling(self) -> bool
fn is_signaling(self) -> bool
Returns
true
if the float is a signaling NaN.fn category(self) -> Category
source§fn get_exact_inverse(self) -> Option<Self>
fn get_exact_inverse(self) -> Option<Self>
If this value has an exact multiplicative inverse, return it.
source§fn ilogb(self) -> ExpInt
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
fn scalbn_r(self, exp: ExpInt, round: Round) -> Self
Returns: self * 2exp for integral exponents.
Equivalent to C standard library function
ldexp
. Read moresource§fn frexp_r(self, exp: &mut ExpInt, round: Round) -> Self
fn frexp_r(self, exp: &mut ExpInt, round: Round) -> Self
Equivalent to C standard library function with the same name. Read more
fn sub_r(self, rhs: Self, round: Round) -> StatusAnd<Self>
fn mul_add(self, multiplicand: Self, addend: Self) -> StatusAnd<Self>
fn abs(self) -> Self
fn copy_sign(self, rhs: Self) -> Self
fn from_i128_r(input: i128, round: Round) -> StatusAnd<Self>
fn from_i128(input: i128) -> StatusAnd<Self>
fn from_u128(input: u128) -> StatusAnd<Self>
source§fn to_i128_r(
self,
width: usize,
round: Round,
is_exact: &mut bool
) -> StatusAnd<i128>
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
fn to_i128(self, width: usize) -> StatusAnd<i128>
fn to_u128(self, width: usize) -> StatusAnd<u128>
source§fn min(self, other: Self) -> Self
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. Read more
source§fn max(self, other: Self) -> Self
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. Read more
source§fn is_normal(self) -> bool
fn is_normal(self) -> bool
IEEE-754R isNormal: Returns whether the current value is normal. Read more
source§fn is_finite(self) -> bool
fn is_finite(self) -> bool
Returns
true
if the current value is zero, subnormal, or
normal. Read moresource§fn is_infinite(self) -> bool
fn is_infinite(self) -> bool
IEEE-754R isInfinite(): Returns whether the float is infinity.
fn is_non_zero(self) -> bool
fn is_finite_non_zero(self) -> bool
fn is_pos_zero(self) -> bool
fn is_neg_zero(self) -> bool
source§fn is_smallest(self) -> bool
fn is_smallest(self) -> bool
Returns
true
if the number has the smallest possible non-zero
magnitude in the current semantics. Read moresource§fn is_largest(self) -> bool
fn is_largest(self) -> bool
Returns
true
if the number has the largest possible finite
magnitude in the current semantics. Read moresource§fn is_integer(self) -> bool
fn is_integer(self) -> bool
Returns
true
if the number is an exact integer.fn scalbn(self, exp: ExpInt) -> Self
fn frexp(self, exp: &mut ExpInt) -> Self
source§impl<F: FloatConvert<Self>> From<DoubleFloat<F>> for IeeeFloat<FallbackS<F>>
impl<F: FloatConvert<Self>> From<DoubleFloat<F>> for IeeeFloat<FallbackS<F>>
source§fn from(DoubleFloat: DoubleFloat<F>) -> Self
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>,
impl<F> From<IeeeFloat<FallbackS<F>>> for DoubleFloat<F>where
F: FloatConvert<IeeeFloat<FallbackExtendedS<F>>> + Float,
IeeeFloat<FallbackExtendedS<F>>: FloatConvert<F>,
source§impl<F> FromStr for DoubleFloat<F>where
Self: Float,
impl<F> FromStr for DoubleFloat<F>where
Self: Float,
§type Err = ParseError
type Err = ParseError
The associated error which can be returned from parsing.
source§impl<F> Mul<DoubleFloat<F>> for DoubleFloat<F>where
Self: Float,
impl<F> Mul<DoubleFloat<F>> for DoubleFloat<F>where
Self: Float,
source§impl<F> MulAssign<DoubleFloat<F>> for DoubleFloat<F>where
Self: Float,
impl<F> MulAssign<DoubleFloat<F>> for DoubleFloat<F>where
Self: Float,
source§fn mul_assign(&mut self, rhs: Self)
fn mul_assign(&mut self, rhs: Self)
Performs the
*=
operation. Read moresource§impl<F: Float> Neg for DoubleFloat<F>
impl<F: Float> Neg for DoubleFloat<F>
source§impl<F: PartialEq> PartialEq<DoubleFloat<F>> for DoubleFloat<F>
impl<F: PartialEq> PartialEq<DoubleFloat<F>> for DoubleFloat<F>
source§fn eq(&self, other: &DoubleFloat<F>) -> bool
fn eq(&self, other: &DoubleFloat<F>) -> bool
source§impl<F: PartialOrd> PartialOrd<DoubleFloat<F>> for DoubleFloat<F>
impl<F: PartialOrd> PartialOrd<DoubleFloat<F>> for DoubleFloat<F>
source§fn partial_cmp(&self, other: &DoubleFloat<F>) -> Option<Ordering>
fn partial_cmp(&self, other: &DoubleFloat<F>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
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 moresource§impl<F> Rem<DoubleFloat<F>> for DoubleFloat<F>where
Self: Float,
impl<F> Rem<DoubleFloat<F>> for DoubleFloat<F>where
Self: Float,
source§impl<F> RemAssign<DoubleFloat<F>> for DoubleFloat<F>where
Self: Float,
impl<F> RemAssign<DoubleFloat<F>> for DoubleFloat<F>where
Self: Float,
source§fn rem_assign(&mut self, rhs: Self)
fn rem_assign(&mut self, rhs: Self)
Performs the
%=
operation. Read moresource§impl<F> Sub<DoubleFloat<F>> for DoubleFloat<F>where
Self: Float,
impl<F> Sub<DoubleFloat<F>> for DoubleFloat<F>where
Self: Float,
source§impl<F> SubAssign<DoubleFloat<F>> for DoubleFloat<F>where
Self: Float,
impl<F> SubAssign<DoubleFloat<F>> for DoubleFloat<F>where
Self: Float,
source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-=
operation. Read moreimpl<F: Copy> Copy for DoubleFloat<F>
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§
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.