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