SmallFloat

Struct SmallFloat 

Source
#[repr(C)]
pub struct SmallFloat<const N: usize> { pub sign_biased_exponent: u64, /* private fields */ }

Fields§

§sign_biased_exponent: u64

Implementations§

Source§

impl<const N: usize> SmallFloat<N>

Source

pub const fn max_precision() -> u64

Source

pub const fn from_parts( precision_bits: u64, sign: Sign, exponent: Exponent, mantissa: [Limb; N], ) -> Self

Source

pub const fn zero(precision_bits: u64) -> Self

Source

pub const fn as_ref(&self) -> &BigFloat

Source

pub fn as_mut(&mut self) -> &mut BigFloat

Methods from Deref<Target = BigFloat>§

Source

pub fn precision_bits(&self) -> u64

Source

pub fn sign(&self) -> Sign

Source

pub fn exponent(&self) -> Exponent

Source

pub fn mantissa_len(&self) -> usize

Source

pub fn mantissa(&self) -> &[Limb]

Source

pub fn mantissa_mut(&mut self) -> &mut [Limb]

Source

pub fn full_mantissa(&self) -> &[Limb]

Source

pub fn full_mantissa_mut(&mut self) -> &mut [Limb]

Source

pub fn copy_from(&mut self, src: &BigFloat, rnd: Round) -> Approx

Source

pub fn to_f64(&self, rnd: Round) -> (f64, Approx)

Source

pub fn repr(&self) -> &FloatRepr

Trait Implementations§

Source§

impl<const N: usize> Clone for SmallFloat<N>

Source§

fn clone(&self) -> SmallFloat<N>

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

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

Performs copy-assignment from source. Read more
Source§

impl<const N: usize> Deref for SmallFloat<N>

Source§

type Target = BigFloat

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl<const N: usize> DerefMut for SmallFloat<N>

Source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
Source§

impl<const N: usize> Display for SmallFloat<N>

Source§

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

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

impl<const N: usize> Zeroable for SmallFloat<N>

Source§

fn zeroed() -> Self

Source§

impl<const N: usize> Copy for SmallFloat<N>

Source§

impl<const N: usize> Pod for SmallFloat<N>

Auto Trait Implementations§

§

impl<const N: usize> Freeze for SmallFloat<N>

§

impl<const N: usize> RefUnwindSafe for SmallFloat<N>

§

impl<const N: usize> Send for SmallFloat<N>

§

impl<const N: usize> Sync for SmallFloat<N>

§

impl<const N: usize> Unpin for SmallFloat<N>

§

impl<const N: usize> UnwindSafe for SmallFloat<N>

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> CheckedBitPattern for T
where T: AnyBitPattern,

Source§

type Bits = T

Self must have the same layout as the specified Bits except for the possible invalid bit patterns being checked during is_valid_bit_pattern.
Source§

fn is_valid_bit_pattern(_bits: &T) -> bool

If this function returns true, then it must be valid to reinterpret bits as &Self.
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<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.
Source§

impl<T> AnyBitPattern for T
where T: Pod,

Source§

impl<T> NoUninit for T
where T: Pod,