pub enum Closed {
Field(Hyperreal),
Series(Puiseux),
}Expand description
A value of the real closure in its one form: a hyperreal when it is a rational function of dt,
otherwise a Puiseux series that is no such function.
Variants§
Implementations§
Source§impl Closed
impl Closed
Sourcepub fn from_hyperreal(h: Hyperreal) -> Closed
pub fn from_hyperreal(h: Hyperreal) -> Closed
A hyperreal of the rational functions of dt.
Sourcepub fn as_standard(&self) -> Option<Algebraic>
pub fn as_standard(&self) -> Option<Algebraic>
The standard number the value is, when it has no infinitesimal part.
Sourcepub fn leading(&self) -> Option<(Rational, Algebraic)>
pub fn leading(&self) -> Option<(Rational, Algebraic)>
The exponent of the leading term in dt and its coefficient; None for zero.
pub fn is_zero(&self) -> bool
pub fn add(&self, o: &Closed) -> Closed
pub fn neg(&self) -> Closed
pub fn sub(&self, o: &Closed) -> Closed
pub fn mul(&self, o: &Closed) -> Closed
Sourcepub fn recip(&self) -> Option<Closed>
pub fn recip(&self) -> Option<Closed>
The reciprocal; None for zero. The reciprocal of a value that is no rational function of a
root of dt is none either.
pub fn div(&self, o: &Closed) -> Option<Closed>
Sourcepub fn pow(&self, k: i32) -> Result<Closed, PowerRefusal>
pub fn pow(&self, k: i32) -> Result<Closed, PowerRefusal>
self^k; refused for zero to a negative power and, on a rational function of a root of
dt, for a power past crate::hyperreal::MAX_POWER_DEGREE in that root.
Sourcepub fn root(&self, n: u32) -> Result<Closed, String>
pub fn root(&self, n: u32) -> Result<Closed, String>
The real n-th root — the positive one for even n — or the reason there is none.
Sourcepub fn compare(&self, o: &Closed) -> Ordering
pub fn compare(&self, o: &Closed) -> Ordering
The order. The terms both expansions hold through the orders that separate their own polynomials’ roots decide it at the first place they differ; expansions that agree that far are ordered by the sign of the difference, which is the zero root of its polynomial exactly when the two are equal.
Sourcepub fn valuation(&self) -> Option<Rational>
pub fn valuation(&self) -> Option<Rational>
The exponent of the leading term in dt; None for zero.
pub fn is_infinitesimal(&self) -> bool
pub fn is_limited(&self) -> bool
Sourcepub fn standard_part(&self) -> Option<Algebraic>
pub fn standard_part(&self) -> Option<Algebraic>
The standard real infinitely close to a limited value; None for an infinite one.