pub struct Posit256(/* private fields */);Implementations§
Source§impl Posit256
impl Posit256
pub const ZERO: Posit256
pub const NAR: Posit256
pub const fn to_u256(&self) -> u256
👎Deprecated since 1.5.3:
use into
pub const fn into_u256(self) -> u256
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: u256) -> Self
pub fn decode(&self) -> Result<(bool, i16, u256, u256), PositDecodeError>
pub fn encode(sign: bool, regime: i16, exp: u256, mantissa: u256) -> Self
Trait Implementations§
Source§impl AddAssign for Posit256
impl AddAssign for Posit256
Source§fn add_assign(&mut self, other: Self)
fn add_assign(&mut self, other: Self)
Performs the
+= operation. Read moreSource§impl DivAssign for Posit256
impl DivAssign for Posit256
Source§fn div_assign(&mut self, other: Self)
fn div_assign(&mut self, other: Self)
Performs the
/= operation. Read moreSource§impl MulAssign for Posit256
impl MulAssign for Posit256
Source§fn mul_assign(&mut self, other: Self)
fn mul_assign(&mut self, other: Self)
Performs the
*= operation. Read moreSource§impl Ord for Posit256
impl Ord for Posit256
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Posit256
impl PartialOrd for Posit256
Source§impl SubAssign for Posit256
impl SubAssign for Posit256
Source§fn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
Performs the
-= operation. Read moreimpl Copy for Posit256
impl Eq for Posit256
impl StructuralPartialEq for Posit256
Auto Trait Implementations§
impl Freeze for Posit256
impl RefUnwindSafe for Posit256
impl Send for Posit256
impl Sync for Posit256
impl Unpin for Posit256
impl UnsafeUnpin for Posit256
impl UnwindSafe for Posit256
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