Struct softfloat_wrapper::F16 [−][src]
standard 16-bit float
Implementations
impl F16
[src]
pub fn from_f32(v: f32) -> Self
[src]
Converts primitive f32
to F16
pub fn from_f64(v: f64) -> Self
[src]
Converts primitive f64
to F16
Trait Implementations
impl Clone for F16
[src]
impl Copy for F16
[src]
impl Debug for F16
[src]
impl Float for F16
[src]
type Payload = u16
const EXPONENT_BIT: Self::Payload
[src]
const FRACTION_BIT: Self::Payload
[src]
const SIGN_POS: usize
[src]
const EXPONENT_POS: usize
[src]
fn set_payload(&mut self, x: Self::Payload)
[src]
fn from_bits(v: Self::Payload) -> Self
[src]
fn to_bits(&self) -> Self::Payload
[src]
fn bits(&self) -> Self::Payload
[src]
fn add<T: Borrow<Self>>(&self, x: T, rnd: RoundingMode) -> Self
[src]
fn sub<T: Borrow<Self>>(&self, x: T, rnd: RoundingMode) -> Self
[src]
fn mul<T: Borrow<Self>>(&self, x: T, rnd: RoundingMode) -> Self
[src]
fn fused_mul_add<T: Borrow<Self>>(&self, x: T, y: T, rnd: RoundingMode) -> Self
[src]
fn div<T: Borrow<Self>>(&self, x: T, rnd: RoundingMode) -> Self
[src]
fn rem<T: Borrow<Self>>(&self, x: T, rnd: RoundingMode) -> Self
[src]
fn sqrt(&self, rnd: RoundingMode) -> Self
[src]
fn eq<T: Borrow<Self>>(&self, x: T) -> bool
[src]
fn lt<T: Borrow<Self>>(&self, x: T) -> bool
[src]
fn le<T: Borrow<Self>>(&self, x: T) -> bool
[src]
fn lt_quiet<T: Borrow<Self>>(&self, x: T) -> bool
[src]
fn le_quiet<T: Borrow<Self>>(&self, x: T) -> bool
[src]
fn eq_signaling<T: Borrow<Self>>(&self, x: T) -> bool
[src]
fn is_signaling_nan(&self) -> bool
[src]
fn from_u32(x: u32, rnd: RoundingMode) -> Self
[src]
fn from_u64(x: u64, rnd: RoundingMode) -> Self
[src]
fn from_i32(x: i32, rnd: RoundingMode) -> Self
[src]
fn from_i64(x: i64, rnd: RoundingMode) -> Self
[src]
fn to_u32(&self, rnd: RoundingMode, exact: bool) -> u32
[src]
fn to_u64(&self, rnd: RoundingMode, exact: bool) -> u64
[src]
fn to_i32(&self, rnd: RoundingMode, exact: bool) -> i32
[src]
fn to_i64(&self, rnd: RoundingMode, exact: bool) -> i64
[src]
fn to_f16(&self, _rnd: RoundingMode) -> F16
[src]
fn to_f32(&self, rnd: RoundingMode) -> F32
[src]
fn to_f64(&self, rnd: RoundingMode) -> F64
[src]
fn to_f128(&self, rnd: RoundingMode) -> F128
[src]
fn round_to_integral(&self, rnd: RoundingMode) -> Self
[src]
fn compare<T: Borrow<Self>>(&self, x: T) -> Option<Ordering>
[src]
fn from_u8(x: u8, rnd: RoundingMode) -> Self where
Self: Sized,
[src]
Self: Sized,
fn from_u16(x: u16, rnd: RoundingMode) -> Self where
Self: Sized,
[src]
Self: Sized,
fn from_i8(x: i8, rnd: RoundingMode) -> Self where
Self: Sized,
[src]
Self: Sized,
fn from_i16(x: i16, rnd: RoundingMode) -> Self where
Self: Sized,
[src]
Self: Sized,
fn neg(&self) -> Self where
Self: Sized,
[src]
Self: Sized,
fn abs(&self) -> Self where
Self: Sized,
[src]
Self: Sized,
fn sign(&self) -> Self::Payload
[src]
fn exponent(&self) -> Self::Payload
[src]
fn fraction(&self) -> Self::Payload
[src]
fn is_positive(&self) -> bool
[src]
fn is_positive_zero(&self) -> bool
[src]
fn is_positive_subnormal(&self) -> bool
[src]
fn is_positive_normal(&self) -> bool
[src]
fn is_positive_infinity(&self) -> bool
[src]
fn is_negative(&self) -> bool
[src]
fn is_negative_zero(&self) -> bool
[src]
fn is_negative_subnormal(&self) -> bool
[src]
fn is_negative_normal(&self) -> bool
[src]
fn is_negative_infinity(&self) -> bool
[src]
fn is_nan(&self) -> bool
[src]
fn is_zero(&self) -> bool
[src]
fn is_subnormal(&self) -> bool
[src]
fn set_sign(&mut self, x: Self::Payload)
[src]
fn set_exponent(&mut self, x: Self::Payload)
[src]
fn set_fraction(&mut self, x: Self::Payload)
[src]
fn positive_infinity() -> Self where
Self: Sized,
[src]
Self: Sized,
fn positive_zero() -> Self where
Self: Sized,
[src]
Self: Sized,
fn negative_infinity() -> Self where
Self: Sized,
[src]
Self: Sized,
fn negative_zero() -> Self where
Self: Sized,
[src]
Self: Sized,
fn quiet_nan() -> Self where
Self: Sized,
[src]
Self: Sized,
Auto Trait Implementations
impl RefUnwindSafe for F16
impl Send for F16
impl Sync for F16
impl Unpin for F16
impl UnwindSafe for F16
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,