Struct BiasedFp

pub struct BiasedFp { pub m: u64, pub p_biased: i32 }

A custom 64-bit floating point type, representing m * 2^p. p is biased, so it be directly shifted into the exponent bits.

Fields

m: u64

The significant digits.

p_biased: i32

The biased, binary exponent.

Implementations

impl BiasedFp

const fn zero_pow2(p_biased: i32) -> Self

Represent 0 ^ p

Trait Implementations

impl Clone for BiasedFp

fn clone(&self) -> BiasedFp

impl Copy for BiasedFp

impl Debug for BiasedFp

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

impl Default for BiasedFp

fn default() -> BiasedFp

impl Eq for BiasedFp

fn assert_fields_are_eq(&self)

impl PartialEq for BiasedFp

fn eq(&self, other: &BiasedFp) -> bool

impl StructuralPartialEq for BiasedFp

impl TrivialClone for BiasedFp

Auto Trait Implementations

impl Freeze for BiasedFp

impl RefUnwindSafe for BiasedFp

impl Send for BiasedFp

impl Sync for BiasedFp

impl Unpin for BiasedFp

impl UnsafeUnpin for BiasedFp

impl UnwindSafe for BiasedFp

Blanket Implementations

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

fn type_id(&self) -> TypeId

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

fn borrow(&self) -> &T

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

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

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

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

impl<T> From<T> for BiasedFp

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> Printable for BiasedFp where T: Copy + Debug,

impl<T> SizeHint for BiasedFp where T: ?Sized,

fn lower_bound(&self) -> usize
fn upper_bound(&self) -> Option<usize>

impl<T> SizedTypeProperties for BiasedFp

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

fn into(self) -> U

Calls U::from(self).

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

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

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

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

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