pub struct Posit8(/* private fields */);
Implementations§
Source§impl Posit8
impl Posit8
pub const ZERO: Posit8
pub const NAR: Posit8
pub const fn to_u8(&self) -> u8
👎Deprecated since 1.5.3: use
into
pub const fn into_u8(self) -> u8
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) -> Self
pub fn from_bits(bits: u8) -> Self
pub fn decode(&self) -> Result<(bool, i16, u8, u8), PositDecodeError>
pub fn encode(sign: bool, regime: i16, exp: u8, mantissa: u8) -> Self
Trait Implementations§
Source§impl AddAssign for Posit8
impl AddAssign for Posit8
Source§fn add_assign(&mut self, other: Self)
fn add_assign(&mut self, other: Self)
Performs the
+=
operation. Read moreSource§impl DivAssign for Posit8
impl DivAssign for Posit8
Source§fn div_assign(&mut self, other: Self)
fn div_assign(&mut self, other: Self)
Performs the
/=
operation. Read moreSource§impl MulAssign for Posit8
impl MulAssign for Posit8
Source§fn mul_assign(&mut self, other: Self)
fn mul_assign(&mut self, other: Self)
Performs the
*=
operation. Read moreSource§impl Ord for Posit8
impl Ord for Posit8
Source§impl PartialOrd for Posit8
impl PartialOrd for Posit8
Source§impl SubAssign for Posit8
impl SubAssign for Posit8
Source§fn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
Performs the
-=
operation. Read moreimpl Copy for Posit8
impl Eq for Posit8
impl StructuralPartialEq for Posit8
Auto Trait Implementations§
impl Freeze for Posit8
impl RefUnwindSafe for Posit8
impl Send for Posit8
impl Sync for Posit8
impl Unpin for Posit8
impl UnwindSafe for Posit8
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: 1 byte