pub enum Multi {
Standard(Algebraic),
One(Closed, Arc<Scale>),
Over {
scale: Arc<Scale>,
q: u32,
num: PolyOver<Multi>,
den: PolyOver<Multi>,
},
Alg(Arc<AlgValue>),
}Expand description
A value of several ordered infinitesimals. See the module documentation.
Variants§
Standard(Algebraic)
A standard number.
One(Closed, Arc<Scale>)
A value of one infinitesimal, not standard.
Over
num/den in scale^(1/q), every coefficient a value of larger infinitesimals and at least one
not standard.
Alg(Arc<AlgValue>)
A value of the real closure at its smallest infinitesimal that is no rational function of a
root of it (crate::closure).
Implementations§
Source§impl Multi
impl Multi
Sourcepub fn of_closed(c: Closed, scale: &Arc<Scale>) -> Multi
pub fn of_closed(c: Closed, scale: &Arc<Scale>) -> Multi
A value of one infinitesimal, in its one form.
Sourcepub fn top(&self) -> Option<&Arc<Scale>>
pub fn top(&self) -> Option<&Arc<Scale>>
The smallest infinitesimal the value involves; None for a standard number.
Sourcepub fn scales(&self) -> Vec<Arc<Scale>>
pub fn scales(&self) -> Vec<Arc<Scale>>
Every infinitesimal the value involves, each once, with the facts all of its parts state.
Sourcepub fn standard_part_at(&self, at: Option<&Arc<Scale>>) -> Option<Multi>
pub fn standard_part_at(&self, at: Option<&Arc<Scale>>) -> Option<Multi>
What the value is infinitely close to among the values of at and the infinitesimals larger than
it, when it is limited from at’s standpoint: every infinitesimal smaller than at read at zero,
the inner limit with at held fixed. With no at, the standard part. None for a value infinite
from that standpoint. Every infinitesimal of the value is ordered with at.
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.
Sourcepub fn is_infinitesimal_at(&self, at: Option<&Arc<Scale>>) -> bool
pub fn is_infinitesimal_at(&self, at: Option<&Arc<Scale>>) -> bool
Zero, or smaller than every positive value of at and the infinitesimals larger than it (every
positive standard number, with no at).
Sourcepub fn is_limited_at(&self, at: Option<&Arc<Scale>>) -> bool
pub fn is_limited_at(&self, at: Option<&Arc<Scale>>) -> bool
Bounded by a value of at and the infinitesimals larger than it (a standard number, with no
at).
pub fn is_infinitesimal(&self) -> bool
pub fn is_limited(&self) -> bool
Sourcepub fn pow(&self, k: i32) -> Result<Multi, MultiPowerError>
pub fn pow(&self, k: i32) -> Result<Multi, MultiPowerError>
self^k; refused for zero to a negative power and for a degree past
crate::hyperreal::MAX_POWER_DEGREE in any of the value’s infinitesimals.
Source§impl Multi
impl Multi
Sourcepub fn render(&self) -> String
pub fn render(&self) -> String
The value as an exact fraction of polynomials in its infinitesimals, as a hyperreal prints: a
polynomial with its coefficients as they are, (1/2)·dt + dx, and any other value as a fraction
of polynomials with coprime integer coefficients where every coefficient is rational,
dx/(2·dt). An infinite integer prints as one of one infinitesimal does, a sum of reciprocals
(Multi::render_reciprocals), wherever it is printed — alone, under a radical, as a
coefficient.
Source§impl Multi
impl Multi
Sourcepub fn to_bytes(&self) -> Vec<u8> ⓘ
pub fn to_bytes(&self) -> Vec<u8> ⓘ
The value’s canonical bytes: each infinitesimal it involves once, by its name, its declaration
(Scale::to_bytes) and the facts about its reciprocal the value holds it with — a residue
class’s, on which an infinite integer of several is one — in the order a walk of the value first
meets them; then the value, each infinitesimal written by its place among them.
Sourcepub fn from_bytes(buf: &[u8]) -> Option<Multi>
pub fn from_bytes(buf: &[u8]) -> Option<Multi>
The value Multi::to_bytes wrote; None for a forged or non-canonical encoding.
Trait Implementations§
Source§impl Coefficient for Multi
A value of several infinitesimals is the coefficient of an expansion in a smaller one, exactly.
impl Coefficient for Multi
A value of several infinitesimals is the coefficient of an expansion in a smaller one, exactly.
fn zero() -> Self
fn one() -> Self
fn of_rational(r: Rational) -> Self
fn add(&self, o: &Self) -> Result<Self, ExpansionError>
fn sub(&self, o: &Self) -> Result<Self, ExpansionError>
fn neg(&self) -> Result<Self, ExpansionError>
fn mul(&self, o: &Self) -> Result<Self, ExpansionError>
Source§fn is_zero(&self) -> Result<bool, ExpansionError>
fn is_zero(&self) -> Result<bool, ExpansionError>
fn recip(&self) -> Result<Self, ExpansionError>
Source§fn sign(&self) -> Result<i32, ExpansionError>
fn sign(&self) -> Result<i32, ExpansionError>
−1, 0 or 1; refused when the sign cannot be told.Source§fn nth_root(&self, n: u32) -> Result<Self, ExpansionError>
fn nth_root(&self, n: u32) -> Result<Self, ExpansionError>
n-th root, the nonnegative one for an even n.Source§fn exp(&self) -> Result<Self, ExpansionError>
fn exp(&self) -> Result<Self, ExpansionError>
exp, for an expansion’s exponential.