Skip to content

Numerator ​

Generated from the engine's own definition: compute-engine's symbol, which we neither extend nor document by hand.

Numerator of an expression

✓ checked against that system · ! checked, with disagreements (hover a chip)Wolfram LanguageNumerator!
Numerator(number) -> nothing | numberNumerator of an expression
Julianumerator(number)Rustnumerator(number)
Typed signatures
TypePackageApplies
(number) -> nothing | numbercompute-enginealways
(number, any*) -> nothing | numbernumber-theoryreplaces residuesalways
(number, any*) -> nothing | numberresiduesreplaces compute-enginealways
(value) -> valueadelesreplaces number-theoryon ProfiniteNumber

Domain: Compute engine

Details
  • Over -> QuotientRing(Integers, p) (Wolfram's Modulus -> p, p prime) reads the expression over the field Z/p\mathbb{Z}/p (@enumeratio/residues): a quotient in lowest terms over Q\mathbb{Q} with integer coefficients, then its coefficients mod p. A constant denominator, and a monomial one when no polynomial divides anywhere, moves its unit into the numerator (x/(2y)→4x/yx/(2y) \to 4x/y mod 7). It stays unevaluated where Wolfram has no answer, as for a denominator that vanishes mod p. It threads over a list. The unit of a denominator of several terms follows Wolfram's convention for a single unknown; with several unknowns the result may differ from Wolfram's by a unit (the same function). Over -> Integers is the ordinary numerator.

Examples

1 more kept as data, checked against the oracles
Basic #
live ↗
InNumerator(34)\mathrm{Numerator}(\frac{3}{4})Out33

An integer is its own numerator

live ↗
InNumerator(5)\mathrm{Numerator}(5)Out55
live ↗
InNumerator(23)\mathrm{Numerator}(\frac{2}{3})Out22
live ↗
InNumerator((x−2)(x−1)(x−3)2)\mathrm{Numerator}(\frac{(x-2)(x-1)}{(x-3)^2})Out(x−2)(x−1)(x-2)(x-1)
live ↗
InNumerator(sin⁡(x)a(sin⁡(x)−2)b)\mathrm{Numerator}(\frac{\sin(x)^{a}}{(\sin(x)-2)^{b}})Outsin⁡(x)a(sin⁡(x)−2)b\frac{\sin(x)^{a}}{(\sin(x)-2)^{b}}
Scope #
live ↗
InNumerator(37)\mathrm{Numerator}(\frac{3}{7})Out33
live ↗
InNumerator(37+111i)\mathrm{Numerator}(\frac{3}{7}+\frac{1}{11}i)Out33+7i33+7i
live ↗
InNumerator((x−1)2(x−3)(x−2))\mathrm{Numerator}(\frac{(x-1)^2}{(x-3)(x-2)})Out(x−1)2(x-1)^2
live ↗
InNumerator(1xab)\mathrm{Numerator}(\frac{1}{xa^{b}})Outa−ba^{-b}
live ↗
InNumerator(2b2xy)\mathrm{Numerator}(2b^2x^{y})Out2b2xy2b^2x^{y}
live ↗
InNumerator(24xy(3b)3,(Over,Z/5Z))\mathrm{Numerator}(\frac{24x^{y}}{(3b)^3}, (\mathrm{Over},ℤ/5ℤ))Out2xy2x^{y}
live ↗
InNumerator(x3+3y43x5−y2,(Over,Z/7Z))\mathrm{Numerator}(\frac{\frac{x}{3}+\frac{3y}{4}}{\frac{3x}{5}-\frac{y}{2}}, (\mathrm{Over},ℤ/7ℤ))Out6x+3y6x+3y
About
Examples13
Checked againstWolfram Language 10 agree2 differSageMath 8 agree3 differJulia 4 agree1 differ1 errorRust 4 agree1 differ
CrosswalkWolfram LanguageJuliaRust

Implementation

mappedsagepackages/oracle/src/mappings.ts

Generic -- works for a plain rational/integer and for a ProfiniteNumber's Sage counterpart (Qhat) alike.

mappedjuliapackages/oracle/src/mappings.ts
mappedrustpackages/oracle/src/mappings.ts