Struct rustc_apfloat::ppc::DoubleFloat
source · pub struct DoubleFloat<F>(F, F);
Tuple Fields
0: F
1: F
Trait Implementations
sourceimpl<F> Add<DoubleFloat<F>> for DoubleFloat<F>where
Self: Float,
impl<F> Add<DoubleFloat<F>> for DoubleFloat<F>where
Self: Float,
sourceimpl<F> AddAssign<DoubleFloat<F>> for DoubleFloat<F>where
Self: Float,
impl<F> AddAssign<DoubleFloat<F>> for DoubleFloat<F>where
Self: Float,
sourcefn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+=
operation. Read moresourceimpl<F: Clone> Clone for DoubleFloat<F>
impl<F: Clone> Clone for DoubleFloat<F>
sourcefn clone(&self) -> DoubleFloat<F>
fn clone(&self) -> DoubleFloat<F>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl<F: Debug> Debug for DoubleFloat<F>
impl<F: Debug> Debug for DoubleFloat<F>
sourceimpl<F> Default for DoubleFloat<F>where
Self: Float,
impl<F> Default for DoubleFloat<F>where
Self: Float,
sourceimpl<F: FloatConvert<IeeeFloat<FallbackS<F>>>> Display for DoubleFloat<F>
impl<F: FloatConvert<IeeeFloat<FallbackS<F>>>> Display for DoubleFloat<F>
sourceimpl<F> Div<DoubleFloat<F>> for DoubleFloat<F>where
Self: Float,
impl<F> Div<DoubleFloat<F>> for DoubleFloat<F>where
Self: Float,
sourceimpl<F> DivAssign<DoubleFloat<F>> for DoubleFloat<F>where
Self: Float,
impl<F> DivAssign<DoubleFloat<F>> for DoubleFloat<F>where
Self: Float,
sourcefn div_assign(&mut self, rhs: Self)
fn div_assign(&mut self, rhs: Self)
Performs the
/=
operation. Read moresourceimpl<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>>>,
sourceconst PRECISION: usize = Fallback<F>::PRECISION
const PRECISION: usize = Fallback<F>::PRECISION
Number of bits in the significand. This includes the integer bit.
sourceconst 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
sourceconst 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
sourceconst SMALLEST: Self = _
const SMALLEST: Self = _
Smallest (by magnitude) finite number.
Might be denormalized, which implies a relative loss of precision. Read more
sourcefn 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
sourcefn bitwise_eq(self, rhs: Self) -> bool
fn bitwise_eq(self, rhs: Self) -> bool
Bitwise comparison for equality (QNaNs compare equal, 0!=-0).
sourcefn is_negative(self) -> bool
fn is_negative(self) -> bool
IEEE-754R isSignMinus: Returns whether the current value is
negative. Read more
sourcefn is_denormal(self) -> bool
fn is_denormal(self) -> bool
IEEE-754R isSubnormal(): Returns whether the float is a
denormal. Read more
sourcefn is_signaling(self) -> bool
fn is_signaling(self) -> bool
Returns
true
if the float is a signaling NaN.fn category(self) -> Category
sourcefn get_exact_inverse(self) -> Option<Self>
fn get_exact_inverse(self) -> Option<Self>
If this value has an exact multiplicative inverse, return it.
sourcefn ilogb(self) -> ExpInt
fn ilogb(self) -> ExpInt
Returns the exponent of the internal representation of the Float. Read more
sourcefn 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 moresourcefn 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>
sourcefn 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>
sourcefn 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
sourcefn 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
sourcefn is_normal(self) -> bool
fn is_normal(self) -> bool
IEEE-754R isNormal: Returns whether the current value is normal. Read more
sourcefn is_finite(self) -> bool
fn is_finite(self) -> bool
Returns
true
if the current value is zero, subnormal, or
normal. Read moresourcefn 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
sourcefn 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 moresourcefn 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 moresourcefn 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
sourceimpl<F: FloatConvert<Self>> From<DoubleFloat<F>> for IeeeFloat<FallbackS<F>>
impl<F: FloatConvert<Self>> From<DoubleFloat<F>> for IeeeFloat<FallbackS<F>>
sourcefn from(DoubleFloat: DoubleFloat<F>) -> Self
fn from(DoubleFloat: DoubleFloat<F>) -> Self
Converts to this type from the input type.
sourceimpl<F: Float> From<IeeeFloat<FallbackS<F>>> for DoubleFloat<F>where
F: FloatConvert<IeeeFloat<FallbackExtendedS<F>>>,
IeeeFloat<FallbackExtendedS<F>>: FloatConvert<F>,
impl<F: Float> From<IeeeFloat<FallbackS<F>>> for DoubleFloat<F>where
F: FloatConvert<IeeeFloat<FallbackExtendedS<F>>>,
IeeeFloat<FallbackExtendedS<F>>: FloatConvert<F>,
sourceimpl<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.
sourceimpl<F> Mul<DoubleFloat<F>> for DoubleFloat<F>where
Self: Float,
impl<F> Mul<DoubleFloat<F>> for DoubleFloat<F>where
Self: Float,
sourceimpl<F> MulAssign<DoubleFloat<F>> for DoubleFloat<F>where
Self: Float,
impl<F> MulAssign<DoubleFloat<F>> for DoubleFloat<F>where
Self: Float,
sourcefn mul_assign(&mut self, rhs: Self)
fn mul_assign(&mut self, rhs: Self)
Performs the
*=
operation. Read moresourceimpl<F: Float> Neg for DoubleFloat<F>
impl<F: Float> Neg for DoubleFloat<F>
type Output = DoubleFloat<F>
type Output = DoubleFloat<F>
The resulting type after applying the
-
operator.sourceimpl<F: PartialEq> PartialEq<DoubleFloat<F>> for DoubleFloat<F>
impl<F: PartialEq> PartialEq<DoubleFloat<F>> for DoubleFloat<F>
sourcefn eq(&self, other: &DoubleFloat<F>) -> bool
fn eq(&self, other: &DoubleFloat<F>) -> bool
sourceimpl<F: PartialOrd> PartialOrd<DoubleFloat<F>> for DoubleFloat<F>
impl<F: PartialOrd> PartialOrd<DoubleFloat<F>> for DoubleFloat<F>
sourcefn partial_cmp(&self, other: &DoubleFloat<F>) -> Option<Ordering>
fn partial_cmp(&self, other: &DoubleFloat<F>) -> Option<Ordering>
1.0.0 · sourcefn 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 moresourceimpl<F> Rem<DoubleFloat<F>> for DoubleFloat<F>where
Self: Float,
impl<F> Rem<DoubleFloat<F>> for DoubleFloat<F>where
Self: Float,
sourceimpl<F> RemAssign<DoubleFloat<F>> for DoubleFloat<F>where
Self: Float,
impl<F> RemAssign<DoubleFloat<F>> for DoubleFloat<F>where
Self: Float,
sourcefn rem_assign(&mut self, rhs: Self)
fn rem_assign(&mut self, rhs: Self)
Performs the
%=
operation. Read moresourceimpl<F> Sub<DoubleFloat<F>> for DoubleFloat<F>where
Self: Float,
impl<F> Sub<DoubleFloat<F>> for DoubleFloat<F>where
Self: Float,
sourceimpl<F> SubAssign<DoubleFloat<F>> for DoubleFloat<F>where
Self: Float,
impl<F> SubAssign<DoubleFloat<F>> for DoubleFloat<F>where
Self: Float,
sourcefn 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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
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.