Struct F64

Source
pub struct F64(/* private fields */);
Expand description

standard 64-bit float

Implementations§

Source§

impl F64

Source

pub fn from_f32(v: f32) -> Self

Converts primitive f32 to F64

Source

pub fn from_f64(v: f64) -> Self

Converts primitive f64 to F64

Trait Implementations§

Source§

impl Clone for F64

Source§

fn clone(&self) -> F64

Returns a duplicate of the value. Read more
1.0.0 · Source§

const fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for F64

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Float for F64

Source§

const EXPONENT_BIT: Self::Payload = {transmute(0x00000000000007ff): <f64::F64 as Float>::Payload}

Source§

const FRACTION_BIT: Self::Payload = {transmute(0x000fffffffffffff): <f64::F64 as Float>::Payload}

Source§

const SIGN_POS: usize = 63usize

Source§

const EXPONENT_POS: usize = 52usize

Source§

type Payload = u64

Source§

fn set_payload(&mut self, x: Self::Payload)

Source§

fn from_bits(v: Self::Payload) -> Self

Source§

fn to_bits(&self) -> Self::Payload

Source§

fn bits(&self) -> Self::Payload

👎Deprecated since 0.3.0: Please use to_bits instead
Source§

fn add<T: Borrow<Self>>(&self, x: T, rnd: RoundingMode) -> Self

Source§

fn sub<T: Borrow<Self>>(&self, x: T, rnd: RoundingMode) -> Self

Source§

fn mul<T: Borrow<Self>>(&self, x: T, rnd: RoundingMode) -> Self

Source§

fn fused_mul_add<T: Borrow<Self>>(&self, x: T, y: T, rnd: RoundingMode) -> Self

Source§

fn div<T: Borrow<Self>>(&self, x: T, rnd: RoundingMode) -> Self

Source§

fn rem<T: Borrow<Self>>(&self, x: T, rnd: RoundingMode) -> Self

Source§

fn sqrt(&self, rnd: RoundingMode) -> Self

Source§

fn eq<T: Borrow<Self>>(&self, x: T) -> bool

Source§

fn lt<T: Borrow<Self>>(&self, x: T) -> bool

Source§

fn le<T: Borrow<Self>>(&self, x: T) -> bool

Source§

fn lt_quiet<T: Borrow<Self>>(&self, x: T) -> bool

Source§

fn le_quiet<T: Borrow<Self>>(&self, x: T) -> bool

Source§

fn eq_signaling<T: Borrow<Self>>(&self, x: T) -> bool

Source§

fn is_signaling_nan(&self) -> bool

Source§

fn from_u32(x: u32, rnd: RoundingMode) -> Self

Source§

fn from_u64(x: u64, rnd: RoundingMode) -> Self

Source§

fn from_i32(x: i32, rnd: RoundingMode) -> Self

Source§

fn from_i64(x: i64, rnd: RoundingMode) -> Self

Source§

fn to_u32(&self, rnd: RoundingMode, exact: bool) -> u32

Source§

fn to_u64(&self, rnd: RoundingMode, exact: bool) -> u64

Source§

fn to_i32(&self, rnd: RoundingMode, exact: bool) -> i32

Source§

fn to_i64(&self, rnd: RoundingMode, exact: bool) -> i64

Source§

fn to_f16(&self, rnd: RoundingMode) -> F16

Source§

fn to_bf16(&self, rnd: RoundingMode) -> BF16

Source§

fn to_f32(&self, rnd: RoundingMode) -> F32

Source§

fn to_f64(&self, _rnd: RoundingMode) -> F64

Source§

fn to_f128(&self, rnd: RoundingMode) -> F128

Source§

fn round_to_integral(&self, rnd: RoundingMode) -> Self

Source§

fn compare<T: Borrow<Self>>(&self, x: T) -> Option<Ordering>

Source§

fn from_u8(x: u8, rnd: RoundingMode) -> Self
where Self: Sized,

Source§

fn from_u16(x: u16, rnd: RoundingMode) -> Self
where Self: Sized,

Source§

fn from_i8(x: i8, rnd: RoundingMode) -> Self
where Self: Sized,

Source§

fn from_i16(x: i16, rnd: RoundingMode) -> Self
where Self: Sized,

Source§

fn neg(&self) -> Self
where Self: Sized,

Source§

fn abs(&self) -> Self
where Self: Sized,

Source§

fn sign(&self) -> Self::Payload

Source§

fn exponent(&self) -> Self::Payload

Source§

fn fraction(&self) -> Self::Payload

Source§

fn is_positive(&self) -> bool

Source§

fn is_positive_zero(&self) -> bool

Source§

fn is_positive_subnormal(&self) -> bool

Source§

fn is_positive_normal(&self) -> bool

Source§

fn is_positive_infinity(&self) -> bool

Source§

fn is_negative(&self) -> bool

Source§

fn is_negative_zero(&self) -> bool

Source§

fn is_negative_subnormal(&self) -> bool

Source§

fn is_negative_normal(&self) -> bool

Source§

fn is_negative_infinity(&self) -> bool

Source§

fn is_nan(&self) -> bool

Source§

fn is_zero(&self) -> bool

Source§

fn is_subnormal(&self) -> bool

Source§

fn set_sign(&mut self, x: Self::Payload)

Source§

fn set_exponent(&mut self, x: Self::Payload)

Source§

fn set_fraction(&mut self, x: Self::Payload)

Source§

fn positive_infinity() -> Self
where Self: Sized,

Source§

fn positive_zero() -> Self
where Self: Sized,

Source§

fn negative_infinity() -> Self
where Self: Sized,

Source§

fn negative_zero() -> Self
where Self: Sized,

Source§

fn quiet_nan() -> Self
where Self: Sized,

Source§

impl Copy for F64

Auto Trait Implementations§

§

impl Freeze for F64

§

impl RefUnwindSafe for F64

§

impl Send for F64

§

impl Sync for F64

§

impl Unpin for F64

§

impl UnwindSafe for F64

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.