pub struct Number(/* private fields */);Expand description
Scheme numeric type.
Implementations§
Source§impl Number
impl Number
pub fn as_simple(&self) -> Option<&SimpleNumber>
pub fn as_complex(&self) -> Option<&ComplexNumber>
pub fn is_zero(&self) -> bool
pub fn is_integer(&self) -> bool
pub fn is_rational(&self) -> bool
pub fn is_real(&self) -> bool
pub fn is_integer_valued(&self) -> bool
pub fn is_rational_valued(&self) -> bool
pub fn is_real_valued(&self) -> bool
Sourcepub fn is_complex(&self) -> bool
pub fn is_complex(&self) -> bool
All numbers are complex!
pub fn is_exact(&self) -> bool
pub fn is_inexact(&self) -> bool
pub fn inexact(self) -> Number
pub fn exact(self) -> Number
pub fn eqv(&self, rhs: &Self) -> bool
pub fn pow(&self, rhs: &Number) -> Number
pub fn exp(&self) -> Self
pub fn ln(&self) -> Self
pub fn sqrt(&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
Trait Implementations§
Source§impl From<ComplexNumber> for Number
impl From<ComplexNumber> for Number
Source§fn from(complex: ComplexNumber) -> Self
fn from(complex: ComplexNumber) -> Self
Converts to this type from the input type.
Source§impl From<Number> for UnpackedValue
impl From<Number> for UnpackedValue
Source§impl PartialOrd for Number
impl PartialOrd for Number
Source§impl TryFrom<&Number> for ComplexNumber
impl TryFrom<&Number> for ComplexNumber
Source§impl TryFrom<&Number> for SimpleNumber
impl TryFrom<&Number> for SimpleNumber
Source§impl TryFrom<Number> for ComplexNumber
impl TryFrom<Number> for ComplexNumber
Source§impl TryFrom<Number> for SimpleNumber
impl TryFrom<Number> for SimpleNumber
Source§impl TryFrom<UnpackedValue> for Number
impl TryFrom<UnpackedValue> for Number
Auto Trait Implementations§
impl Freeze for Number
impl RefUnwindSafe for Number
impl Send for Number
impl Sync for Number
impl Unpin for Number
impl UnwindSafe for Number
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,
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 more