pub enum Float {
Rug(Float),
Fastnum(Decimal),
F64(f64),
F32(f32),
}
Variants§
Implementations§
Source§impl Float
impl Float
pub fn abs(self) -> Self
pub fn recip(self) -> Self
pub fn sqrt(self) -> Self
pub fn exp(self) -> Self
pub fn ln(self) -> Self
pub fn log2(self) -> Self
pub fn log10(self) -> Self
pub fn cbrt(self) -> Self
pub fn sin(self) -> Self
pub fn cos(self) -> Self
pub fn tan(self) -> Self
pub fn asin(self) -> Self
pub fn acos(self) -> Self
pub fn atan(self) -> Self
pub fn sinh(self) -> Self
pub fn cosh(self) -> Self
pub fn tanh(self) -> Self
pub fn asinh(self) -> Self
pub fn acosh(self) -> Self
pub fn atanh(self) -> Self
pub fn round(self) -> Self
pub fn floor(self) -> Self
pub fn ceil(self) -> Self
pub fn trunc(self) -> Self
pub fn fract(self) -> Self
pub fn is_nan(self) -> bool
pub fn is_infinite(self) -> bool
pub fn is_finite(self) -> bool
pub fn is_sign_positive(self) -> bool
pub fn is_sign_negative(self) -> bool
Trait Implementations§
Source§impl AddAssign<&Float> for Float
impl AddAssign<&Float> for Float
Source§fn add_assign(&mut self, rhs: &Self)
fn add_assign(&mut self, rhs: &Self)
Performs the
+=
operation. Read moreSource§impl AddAssign<f32> for Float
impl AddAssign<f32> for Float
Source§fn add_assign(&mut self, rhs: f32)
fn add_assign(&mut self, rhs: f32)
Performs the
+=
operation. Read moreSource§impl AddAssign<f64> for Float
impl AddAssign<f64> for Float
Source§fn add_assign(&mut self, rhs: f64)
fn add_assign(&mut self, rhs: f64)
Performs the
+=
operation. Read moreSource§impl AddAssign<i32> for Float
impl AddAssign<i32> for Float
Source§fn add_assign(&mut self, rhs: i32)
fn add_assign(&mut self, rhs: i32)
Performs the
+=
operation. Read moreSource§impl AddAssign<u128> for Float
impl AddAssign<u128> for Float
Source§fn add_assign(&mut self, rhs: u128)
fn add_assign(&mut self, rhs: u128)
Performs the
+=
operation. Read moreSource§impl AddAssign<u64> for Float
impl AddAssign<u64> for Float
Source§fn add_assign(&mut self, rhs: u64)
fn add_assign(&mut self, rhs: u64)
Performs the
+=
operation. Read moreSource§impl AddAssign for Float
impl AddAssign for Float
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+=
operation. Read moreSource§impl<'de> Deserialize<'de> for Float
impl<'de> Deserialize<'de> for Float
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl DivAssign<&Float> for Float
impl DivAssign<&Float> for Float
Source§fn div_assign(&mut self, rhs: &Self)
fn div_assign(&mut self, rhs: &Self)
Performs the
/=
operation. Read moreSource§impl DivAssign<f32> for Float
impl DivAssign<f32> for Float
Source§fn div_assign(&mut self, rhs: f32)
fn div_assign(&mut self, rhs: f32)
Performs the
/=
operation. Read moreSource§impl DivAssign<f64> for Float
impl DivAssign<f64> for Float
Source§fn div_assign(&mut self, rhs: f64)
fn div_assign(&mut self, rhs: f64)
Performs the
/=
operation. Read moreSource§impl DivAssign<i32> for Float
impl DivAssign<i32> for Float
Source§fn div_assign(&mut self, rhs: i32)
fn div_assign(&mut self, rhs: i32)
Performs the
/=
operation. Read moreSource§impl DivAssign<u128> for Float
impl DivAssign<u128> for Float
Source§fn div_assign(&mut self, rhs: u128)
fn div_assign(&mut self, rhs: u128)
Performs the
/=
operation. Read moreSource§impl DivAssign<u64> for Float
impl DivAssign<u64> for Float
Source§fn div_assign(&mut self, rhs: u64)
fn div_assign(&mut self, rhs: u64)
Performs the
/=
operation. Read moreSource§impl DivAssign for Float
impl DivAssign for Float
Source§fn div_assign(&mut self, rhs: Self)
fn div_assign(&mut self, rhs: Self)
Performs the
/=
operation. Read moreSource§impl MulAssign<&Float> for Float
impl MulAssign<&Float> for Float
Source§fn mul_assign(&mut self, rhs: &Self)
fn mul_assign(&mut self, rhs: &Self)
Performs the
*=
operation. Read moreSource§impl MulAssign<f32> for Float
impl MulAssign<f32> for Float
Source§fn mul_assign(&mut self, rhs: f32)
fn mul_assign(&mut self, rhs: f32)
Performs the
*=
operation. Read moreSource§impl MulAssign<f64> for Float
impl MulAssign<f64> for Float
Source§fn mul_assign(&mut self, rhs: f64)
fn mul_assign(&mut self, rhs: f64)
Performs the
*=
operation. Read moreSource§impl MulAssign<i32> for Float
impl MulAssign<i32> for Float
Source§fn mul_assign(&mut self, rhs: i32)
fn mul_assign(&mut self, rhs: i32)
Performs the
*=
operation. Read moreSource§impl MulAssign<u128> for Float
impl MulAssign<u128> for Float
Source§fn mul_assign(&mut self, rhs: u128)
fn mul_assign(&mut self, rhs: u128)
Performs the
*=
operation. Read moreSource§impl MulAssign<u64> for Float
impl MulAssign<u64> for Float
Source§fn mul_assign(&mut self, rhs: u64)
fn mul_assign(&mut self, rhs: u64)
Performs the
*=
operation. Read moreSource§impl MulAssign for Float
impl MulAssign for Float
Source§fn mul_assign(&mut self, rhs: Self)
fn mul_assign(&mut self, rhs: Self)
Performs the
*=
operation. Read moreSource§impl PartialOrd<f64> for Float
impl PartialOrd<f64> for Float
Source§impl PartialOrd<i32> for Float
impl PartialOrd<i32> for Float
Source§impl PartialOrd for Float
impl PartialOrd for Float
Source§impl SpecialValues for Float
impl SpecialValues for Float
Source§impl SubAssign<&Float> for Float
impl SubAssign<&Float> for Float
Source§fn sub_assign(&mut self, rhs: &Self)
fn sub_assign(&mut self, rhs: &Self)
Performs the
-=
operation. Read moreSource§impl SubAssign<f32> for Float
impl SubAssign<f32> for Float
Source§fn sub_assign(&mut self, rhs: f32)
fn sub_assign(&mut self, rhs: f32)
Performs the
-=
operation. Read moreSource§impl SubAssign<f64> for Float
impl SubAssign<f64> for Float
Source§fn sub_assign(&mut self, rhs: f64)
fn sub_assign(&mut self, rhs: f64)
Performs the
-=
operation. Read moreSource§impl SubAssign<i32> for Float
impl SubAssign<i32> for Float
Source§fn sub_assign(&mut self, rhs: i32)
fn sub_assign(&mut self, rhs: i32)
Performs the
-=
operation. Read moreSource§impl SubAssign<u128> for Float
impl SubAssign<u128> for Float
Source§fn sub_assign(&mut self, rhs: u128)
fn sub_assign(&mut self, rhs: u128)
Performs the
-=
operation. Read moreSource§impl SubAssign<u64> for Float
impl SubAssign<u64> for Float
Source§fn sub_assign(&mut self, rhs: u64)
fn sub_assign(&mut self, rhs: u64)
Performs the
-=
operation. Read moreSource§impl SubAssign for Float
impl SubAssign for Float
Source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-=
operation. Read moreimpl StructuralPartialEq for Float
Auto Trait Implementations§
impl Freeze for Float
impl RefUnwindSafe for Float
impl Send for Float
impl Sync for Float
impl Unpin for Float
impl UnwindSafe for Float
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> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Casts the value.
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
Source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
Source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Casts the value.
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
Source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
Source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
Source§fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
Source§fn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> WrappingAs for T
impl<T> WrappingAs for T
Source§fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
Source§fn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
Casts the value.