Trait compiler_builtins::float::Float [] [src]

pub trait Float: Sized + Copy {
    type Int;
    fn bits() -> u32;
    fn significand_bits() -> u32;
    fn sign_mask() -> Self::Int;
    fn significand_mask() -> Self::Int;
    fn exponent_mask() -> Self::Int;
    fn repr(self) -> Self::Int;
    fn from_repr(a: Self::Int) -> Self;
    fn from_parts(sign: bool,
                  exponent: Self::Int,
                  significand: Self::Int)
                  -> Self; fn normalize(significand: Self::Int) -> (i32, Self::Int); fn exponent_bits() -> u32 { ... } }
🔬 This is a nightly-only experimental API.   (compiler_builtins_lib)

Compiler builtins. Will never become stable.

Trait for some basic operations on floats

Associated Types

🔬 This is a nightly-only experimental API.   (compiler_builtins_lib)

Compiler builtins. Will never become stable.

A uint of the same with as the float

Required Methods

🔬 This is a nightly-only experimental API.   (compiler_builtins_lib)

Compiler builtins. Will never become stable.

Returns the bitwidth of the float type

🔬 This is a nightly-only experimental API.   (compiler_builtins_lib)

Compiler builtins. Will never become stable.

Returns the bitwidth of the significand

🔬 This is a nightly-only experimental API.   (compiler_builtins_lib)

Compiler builtins. Will never become stable.

Returns a mask for the sign bit

🔬 This is a nightly-only experimental API.   (compiler_builtins_lib)

Compiler builtins. Will never become stable.

Returns a mask for the significand

🔬 This is a nightly-only experimental API.   (compiler_builtins_lib)

Compiler builtins. Will never become stable.

Returns a mask for the exponent

🔬 This is a nightly-only experimental API.   (compiler_builtins_lib)

Compiler builtins. Will never become stable.

Returns self transmuted to Self::Int

🔬 This is a nightly-only experimental API.   (compiler_builtins_lib)

Compiler builtins. Will never become stable.

Returns a Self::Int transmuted back to Self

🔬 This is a nightly-only experimental API.   (compiler_builtins_lib)

Compiler builtins. Will never become stable.

Constructs a Self from its parts. Inputs are treated as bits and shifted into position.

🔬 This is a nightly-only experimental API.   (compiler_builtins_lib)

Compiler builtins. Will never become stable.

Returns (normalized exponent, normalized significand)

Provided Methods

🔬 This is a nightly-only experimental API.   (compiler_builtins_lib)

Compiler builtins. Will never become stable.

Returns the bitwidth of the exponent

Implementors