pub struct Posit128(/* private fields */);
Implementations§
Source§impl Posit128
impl Posit128
pub const ZERO: Posit128
pub const NAR: Posit128
pub const fn to_u128(&self) -> u128
👎Deprecated since 1.5.3: use
into
pub const fn into_u128(self) -> u128
pub fn is_nar(&self) -> bool
pub fn is_zero(&self) -> bool
pub fn is_negative(&self) -> bool
pub fn is_positive(&self) -> bool
pub fn abs(self) -> Posit128
pub fn from_bits(bits: u128) -> Posit128
pub fn decode(&self) -> Result<(bool, i16, u128, u128), PositDecodeError>
pub fn encode(sign: bool, regime: i16, exp: u128, mantissa: u128) -> Posit128
Trait Implementations§
Source§impl AddAssign for Posit128
impl AddAssign for Posit128
Source§fn add_assign(&mut self, other: Posit128)
fn add_assign(&mut self, other: Posit128)
Performs the
+=
operation. Read moreSource§impl DivAssign for Posit128
impl DivAssign for Posit128
Source§fn div_assign(&mut self, other: Posit128)
fn div_assign(&mut self, other: Posit128)
Performs the
/=
operation. Read moreSource§impl MulAssign for Posit128
impl MulAssign for Posit128
Source§fn mul_assign(&mut self, other: Posit128)
fn mul_assign(&mut self, other: Posit128)
Performs the
*=
operation. Read moreSource§impl Ord for Posit128
impl Ord for Posit128
Source§impl PartialOrd for Posit128
impl PartialOrd for Posit128
Source§impl SubAssign for Posit128
impl SubAssign for Posit128
Source§fn sub_assign(&mut self, other: Posit128)
fn sub_assign(&mut self, other: Posit128)
Performs the
-=
operation. Read moreimpl Copy for Posit128
impl Eq for Posit128
impl StructuralPartialEq for Posit128
Auto Trait Implementations§
impl Freeze for Posit128
impl RefUnwindSafe for Posit128
impl Send for Posit128
impl Sync for Posit128
impl Unpin for Posit128
impl UnwindSafe for Posit128
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 16 bytes