Struct rustc_apfloat::ieee::IeeeFloat [−][src]
Fields
sig: [u128; 1]Absolute significand value (including the integer bit).
exp: ExpIntThe signed unbiased exponent of the value.
category: CategoryWhat kind of floating point number this is.
sign: boolSign bit of the number.
marker: PhantomData<S>Implementations
impl<S: Semantics> IeeeFloat<S>[src]
fn overflow_result(round: Round) -> StatusAnd<Self>[src]
Handle positive overflow. We either return infinity or
the largest finite number. For negative overflow,
negate the round argument before calling.
fn round_away_from_zero(&self, round: Round, loss: Loss, bit: usize) -> bool[src]
Returns true if, when truncating the current number, with bit the
new LSB, with the given lost fraction and rounding mode, the result
would need to be rounded away from zero (i.e., by increasing the
signficand). This routine must work for Category::Zero of both signs, and
Category::Normal numbers.
fn normalize(self, round: Round, loss: Loss) -> StatusAnd<Self>[src]
fn from_hexadecimal_string(
s: &str,
round: Round
) -> Result<StatusAnd<Self>, ParseError>[src]
s: &str,
round: Round
) -> Result<StatusAnd<Self>, ParseError>
fn from_decimal_string(
s: &str,
round: Round
) -> Result<StatusAnd<Self>, ParseError>[src]
s: &str,
round: Round
) -> Result<StatusAnd<Self>, ParseError>
Trait Implementations
impl<S> Add<IeeeFloat<S>> for IeeeFloat<S> where
Self: Float, [src]
Self: Float,
type Output = StatusAnd<Self>
The resulting type after applying the + operator.
fn add(self, rhs: Self) -> StatusAnd<Self>[src]
impl<S> AddAssign<IeeeFloat<S>> for IeeeFloat<S> where
Self: Float, [src]
Self: Float,
fn add_assign(&mut self, rhs: Self)[src]
impl<S> Clone for IeeeFloat<S>[src]
fn clone(&self) -> Self[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl<S> Copy for IeeeFloat<S>[src]
impl<S: Semantics> Debug for IeeeFloat<S>[src]
impl<S> Default for IeeeFloat<S> where
Self: Float, [src]
Self: Float,
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
impl<S> Div<IeeeFloat<S>> for IeeeFloat<S> where
Self: Float, [src]
Self: Float,
type Output = StatusAnd<Self>
The resulting type after applying the / operator.
fn div(self, rhs: Self) -> StatusAnd<Self>[src]
impl<S> DivAssign<IeeeFloat<S>> for IeeeFloat<S> where
Self: Float, [src]
Self: Float,
fn div_assign(&mut self, rhs: Self)[src]
impl<S: Semantics> Float for IeeeFloat<S>[src]
const BITS: usize[src]
const PRECISION: usize[src]
const MAX_EXP: ExpInt[src]
const MIN_EXP: ExpInt[src]
const ZERO: Self[src]
const INFINITY: Self[src]
const NAN: Self[src]
fn qnan(payload: Option<u128>) -> Self[src]
fn snan(payload: Option<u128>) -> Self[src]
fn largest() -> Self[src]
const SMALLEST: Self[src]
fn smallest_normalized() -> Self[src]
fn add_r(self, rhs: Self, round: Round) -> StatusAnd<Self>[src]
fn mul_r(self, rhs: Self, round: Round) -> StatusAnd<Self>[src]
fn mul_add_r(
self,
multiplicand: Self,
addend: Self,
round: Round
) -> StatusAnd<Self>[src]
self,
multiplicand: Self,
addend: Self,
round: Round
) -> StatusAnd<Self>
fn div_r(self, rhs: Self, round: Round) -> StatusAnd<Self>[src]
fn c_fmod(self, rhs: Self) -> StatusAnd<Self>[src]
fn round_to_integral(self, round: Round) -> StatusAnd<Self>[src]
fn next_up(self) -> StatusAnd<Self>[src]
fn from_bits(input: u128) -> Self[src]
fn from_u128_r(input: u128, round: Round) -> StatusAnd<Self>[src]
fn from_str_r(s: &str, round: Round) -> Result<StatusAnd<Self>, ParseError>[src]
fn to_bits(self) -> u128[src]
fn to_u128_r(
self,
width: usize,
round: Round,
is_exact: &mut bool
) -> StatusAnd<u128>[src]
self,
width: usize,
round: Round,
is_exact: &mut bool
) -> StatusAnd<u128>
fn cmp_abs_normal(self, rhs: Self) -> Ordering[src]
fn bitwise_eq(self, rhs: Self) -> bool[src]
fn is_negative(self) -> bool[src]
fn is_denormal(self) -> bool[src]
fn is_signaling(self) -> bool[src]
fn category(self) -> Category[src]
fn get_exact_inverse(self) -> Option<Self>[src]
fn ilogb(self) -> ExpInt[src]
fn scalbn_r(self, exp: ExpInt, round: Round) -> Self[src]
fn frexp_r(self, exp: &mut ExpInt, round: Round) -> Self[src]
fn sub_r(self, rhs: Self, round: Round) -> StatusAnd<Self>[src]
fn mul_add(self, multiplicand: Self, addend: Self) -> StatusAnd<Self>[src]
fn ieee_rem(self, rhs: Self) -> StatusAnd<Self>[src]
fn next_down(self) -> StatusAnd<Self>[src]
fn abs(self) -> Self[src]
fn copy_sign(self, rhs: Self) -> Self[src]
fn from_i128_r(input: i128, round: Round) -> StatusAnd<Self>[src]
fn from_i128(input: i128) -> StatusAnd<Self>[src]
fn from_u128(input: u128) -> StatusAnd<Self>[src]
fn to_i128_r(
self,
width: usize,
round: Round,
is_exact: &mut bool
) -> StatusAnd<i128>[src]
self,
width: usize,
round: Round,
is_exact: &mut bool
) -> StatusAnd<i128>
fn to_i128(self, width: usize) -> StatusAnd<i128>[src]
fn to_u128(self, width: usize) -> StatusAnd<u128>[src]
fn min(self, other: Self) -> Self[src]
fn max(self, other: Self) -> Self[src]
fn is_normal(self) -> bool[src]
fn is_finite(self) -> bool[src]
fn is_zero(self) -> bool[src]
fn is_infinite(self) -> bool[src]
fn is_nan(self) -> bool[src]
fn is_non_zero(self) -> bool[src]
fn is_finite_non_zero(self) -> bool[src]
fn is_pos_zero(self) -> bool[src]
fn is_neg_zero(self) -> bool[src]
fn is_smallest(self) -> bool[src]
fn is_largest(self) -> bool[src]
fn is_integer(self) -> bool[src]
fn scalbn(self, exp: ExpInt) -> Self[src]
fn frexp(self, exp: &mut ExpInt) -> Self[src]
impl<S: Semantics, T: Semantics> FloatConvert<IeeeFloat<T>> for IeeeFloat<S>[src]
fn convert_r(
self,
round: Round,
loses_info: &mut bool
) -> StatusAnd<IeeeFloat<T>>[src]
self,
round: Round,
loses_info: &mut bool
) -> StatusAnd<IeeeFloat<T>>
fn convert(self, loses_info: &mut bool) -> StatusAnd<T>[src]
impl<F: FloatConvert<Self>> From<DoubleFloat<F>> for IeeeFloat<FallbackS<F>>[src]
fn from(DoubleFloat: DoubleFloat<F>) -> Self[src]
impl<F: Float> From<IeeeFloat<FallbackS<F>>> for DoubleFloat<F> where
F: FloatConvert<IeeeFloat<FallbackExtendedS<F>>>,
IeeeFloat<FallbackExtendedS<F>>: FloatConvert<F>, [src]
F: FloatConvert<IeeeFloat<FallbackExtendedS<F>>>,
IeeeFloat<FallbackExtendedS<F>>: FloatConvert<F>,
impl<S> FromStr for IeeeFloat<S> where
Self: Float, [src]
Self: Float,
type Err = ParseError
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Self, ParseError>[src]
impl<S> Mul<IeeeFloat<S>> for IeeeFloat<S> where
Self: Float, [src]
Self: Float,
type Output = StatusAnd<Self>
The resulting type after applying the * operator.
fn mul(self, rhs: Self) -> StatusAnd<Self>[src]
impl<S> MulAssign<IeeeFloat<S>> for IeeeFloat<S> where
Self: Float, [src]
Self: Float,
fn mul_assign(&mut self, rhs: Self)[src]
impl<S> Neg for IeeeFloat<S>[src]
impl<S: Semantics> PartialEq<IeeeFloat<S>> for IeeeFloat<S>[src]
impl<S: Semantics> PartialOrd<IeeeFloat<S>> for IeeeFloat<S>[src]
fn partial_cmp(&self, rhs: &Self) -> Option<Ordering>[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool1.0.0[src]
impl<S> Rem<IeeeFloat<S>> for IeeeFloat<S> where
Self: Float, [src]
Self: Float,
type Output = StatusAnd<Self>
The resulting type after applying the % operator.
fn rem(self, rhs: Self) -> StatusAnd<Self>[src]
impl<S> RemAssign<IeeeFloat<S>> for IeeeFloat<S> where
Self: Float, [src]
Self: Float,
fn rem_assign(&mut self, rhs: Self)[src]
impl<S> Sub<IeeeFloat<S>> for IeeeFloat<S> where
Self: Float, [src]
Self: Float,
type Output = StatusAnd<Self>
The resulting type after applying the - operator.
fn sub(self, rhs: Self) -> StatusAnd<Self>[src]
impl<S> SubAssign<IeeeFloat<S>> for IeeeFloat<S> where
Self: Float, [src]
Self: Float,
fn sub_assign(&mut self, rhs: Self)[src]
Auto Trait Implementations
impl<S> Send for IeeeFloat<S> where
S: Send,
S: Send,
impl<S> Sync for IeeeFloat<S> where
S: Sync,
S: Sync,
impl<S> Unpin for IeeeFloat<S> where
S: Unpin,
S: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T> ToString for T where
T: Display + ?Sized, [src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,