[][src]Trait rustc_apfloat::Float

pub trait Float: Copy + Default + FromStr<Err = ParseError> + PartialOrd + Display + Neg<Output = Self> + AddAssign + SubAssign + MulAssign + DivAssign + RemAssign + Add<Output = StatusAnd<Self>> + Sub<Output = StatusAnd<Self>> + Mul<Output = StatusAnd<Self>> + Div<Output = StatusAnd<Self>> + Rem<Output = StatusAnd<Self>> {
    const BITS: usize;
    const PRECISION: usize;
    const MAX_EXP: ExpInt;
    const MIN_EXP: ExpInt;
    const ZERO: Self;
    const INFINITY: Self;
    const NAN: Self;
    const SMALLEST: Self;

    fn qnan(payload: Option<u128>) -> Self;
fn snan(payload: Option<u128>) -> Self;
fn largest() -> Self;
fn smallest_normalized() -> Self;
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 c_fmod(self, rhs: Self) -> StatusAnd<Self>;
fn round_to_integral(self, round: Round) -> StatusAnd<Self>;
fn next_up(self) -> 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;
fn bitwise_eq(self, rhs: Self) -> bool;
fn is_negative(self) -> bool;
fn is_denormal(self) -> bool;
fn is_signaling(self) -> bool;
fn category(self) -> Category;
fn get_exact_inverse(self) -> Option<Self>;
fn ilogb(self) -> ExpInt;
fn scalbn_r(self, exp: ExpInt, round: Round) -> Self;
fn frexp_r(self, exp: &mut ExpInt, round: Round) -> Self; fn sub_r(self, rhs: Self, round: Round) -> StatusAnd<Self> { ... }
fn mul_add(self, multiplicand: Self, addend: Self) -> StatusAnd<Self> { ... }
fn ieee_rem(self, rhs: Self) -> StatusAnd<Self> { ... }
fn next_down(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> { ... }
fn to_i128_r(
        self,
        width: usize,
        round: Round,
        is_exact: &mut bool
    ) -> StatusAnd<i128> { ... }
fn to_i128(self, width: usize) -> StatusAnd<i128> { ... }
fn to_u128(self, width: usize) -> StatusAnd<u128> { ... }
fn min(self, other: Self) -> Self { ... }
fn max(self, other: Self) -> Self { ... }
fn is_normal(self) -> bool { ... }
fn is_finite(self) -> bool { ... }
fn is_zero(self) -> bool { ... }
fn is_infinite(self) -> bool { ... }
fn is_nan(self) -> bool { ... }
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 { ... }
fn is_smallest(self) -> bool { ... }
fn is_largest(self) -> bool { ... }
fn is_integer(self) -> bool { ... }
fn scalbn(self, exp: ExpInt) -> Self { ... }
fn frexp(self, exp: &mut ExpInt) -> Self { ... } }
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

A self-contained host- and target-independent arbitrary-precision floating-point software implementation.

apfloat uses significand bignum integer arithmetic as provided by functions in the ieee::sig.

Written for clarity rather than speed, in particular with a view to use in the front-end of a cross compiler so that target arithmetic can be correctly performed on the host. Performance should nonetheless be reasonable, particularly for its intended use. It may be useful as a base implementation for a run-time library during development of a faster target-specific one.

All 5 rounding modes in the IEEE-754R draft are handled correctly for all implemented operations. Currently implemented operations are add, subtract, multiply, divide, fused-multiply-add, conversion-to-float, conversion-to-integer and conversion-from-integer. New rounding modes (e.g., away from zero) can be added with three or four lines of code.

Four formats are built-in: IEEE single precision, double precision, quadruple precision, and x87 80-bit extended double (when operating with full extended precision). Adding a new format that obeys IEEE semantics only requires adding two lines of code: a declaration and definition of the format.

All operations return the status of that operation as an exception bit-mask, so multiple operations can be done consecutively with their results or-ed together. The returned status can be useful for compiler diagnostics; e.g., inexact, underflow and overflow can be easily diagnosed on constant folding, and compiler optimizers can determine what exceptions would be raised by folding operations and optimize, or perhaps not optimize, accordingly.

At present, underflow tininess is detected after rounding; it should be straight forward to add support for the before-rounding case too.

The library reads hexadecimal floating point numbers as per C99, and correctly rounds if necessary according to the specified rounding mode. Syntax is required to have been validated by the caller.

It also reads decimal floating point numbers and correctly rounds according to the specified rounding mode.

Non-zero finite numbers are represented internally as a sign bit, a 16-bit signed exponent, and the significand as an array of integer limbs. After normalization of a number of precision P the exponent is within the range of the format, and if the number is not denormal the P-th bit of the significand is set as an explicit integer bit. For denormals the most significant bit is shifted right so that the exponent is maintained at the format's minimum, so that the smallest denormal has just the least significant bit of the significand set. The sign of zeros and infinities is significant; the exponent and significand of such numbers is not stored, but has a known implicit (deterministic) value: 0 for the significands, 0 for zero exponent, all 1 bits for infinity exponent. For NaNs the sign and significand are deterministic, although not really meaningful, and preserved in non-conversion operations. The exponent is implicitly all 1 bits.

apfloat does not provide any exception handling beyond default exception handling. We represent Signaling NaNs via IEEE-754R 2008 6.2.1 should clause by encoding Signaling NaNs with the first bit of its trailing significand as 0.

Future work

Some features that may or may not be worth adding:

Optional ability to detect underflow tininess before rounding.

New formats: x87 in single and double precision mode (IEEE apart from extended exponent range) (hard).

New operations: sqrt, nexttoward.

Associated Constants

const BITS: usize

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Total number of bits in the in-memory format.

const PRECISION: usize

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

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

const MAX_EXP: ExpInt

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

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

const MIN_EXP: ExpInt

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

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

const ZERO: Self

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Positive Zero.

const INFINITY: Self

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Positive Infinity.

const NAN: Self

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

NaN (Not a Number).

const SMALLEST: Self

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

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

Loading content...

Required methods

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

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Factory for QNaN values.

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

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Factory for SNaN values.

fn largest() -> Self

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Largest finite number.

fn smallest_normalized() -> Self

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Smallest (by magnitude) normalized finite number.

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

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

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

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

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

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

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

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

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

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

C fmod, or llvm frem.

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

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn next_up(self) -> StatusAnd<Self>

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

IEEE-754R 2008 5.3.1: nextUp.

fn from_bits(input: u128) -> Self

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

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

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

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

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn to_bits(self) -> u128

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

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

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

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

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

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

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

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

fn is_negative(self) -> bool

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

IEEE-754R isSignMinus: Returns whether the current value is negative.

This applies to zeros and NaNs as well.

fn is_denormal(self) -> bool

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

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

fn is_signaling(self) -> bool

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Returns true if the float is a signaling NaN.

fn category(self) -> Category

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn get_exact_inverse(self) -> Option<Self>

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

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

fn ilogb(self) -> ExpInt

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Returns the exponent of the internal representation of the Float.

Because the radix of Float is 2, this is equivalent to floor(log2(x)). For special Float values, this returns special error codes:

NaN -> \c IEK_NAN 0 -> \c IEK_ZERO Inf -> \c IEK_INF

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

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

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

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

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Equivalent to C standard library function with the same name.

While the C standard says exp is an unspecified value for infinity and nan, this returns INT_MAX for infinities, and INT_MIN for NaNs (see ilogb).

Loading content...

Provided methods

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

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

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

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

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

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

IEEE remainder.

fn next_down(self) -> StatusAnd<Self>

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

IEEE-754R 2008 5.3.1: nextDown.

NOTE since nextDown(x) = -nextUp(-x), we only implement nextUp with appropriate sign switching before/after the computation.

fn abs(self) -> Self

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

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

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

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

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

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

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

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

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

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

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

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.

Note that for conversions to integer type the C standard requires round-to-zero to always be used.

The *is_exact output tells whether the result is exact, in the sense that converting it back to the original floating point type produces the original value. This is almost equivalent to result == Status::OK, except for negative zeroes.

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

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

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

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

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

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

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.

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

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

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.

fn is_normal(self) -> bool

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

IEEE-754R isNormal: Returns whether the current value is normal.

This implies that the current value of the float is not zero, subnormal, infinite, or NaN following the definition of normality from IEEE-754R.

fn is_finite(self) -> bool

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Returns true if the current value is zero, subnormal, or normal.

This means that the value is not infinite or NaN.

fn is_zero(self) -> bool

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Returns true if the float is plus or minus zero.

fn is_infinite(self) -> bool

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

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

fn is_nan(self) -> bool

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

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

fn is_non_zero(self) -> bool

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn is_finite_non_zero(self) -> bool

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn is_pos_zero(self) -> bool

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn is_neg_zero(self) -> bool

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn is_smallest(self) -> bool

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

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

fn is_largest(self) -> bool

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

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

fn is_integer(self) -> bool

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Returns true if the number is an exact integer.

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

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

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

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Loading content...

Implementors

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

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

Loading content...