Optionalvalue: InputValue<Fraction>Get the coefficient k of the monom k·x^n
This display getter is to be used in the polynom display getter
Every divisor of the monom: each divisor of the absolute value of the coefficient, combined with every exponent from 0 up to the exponent of each variable. A monom with a non-integer coefficient or exponent, or a numerator above 1 000 000, is returned alone.
Get the literal part of x^a·y^b as a dictionary from each variable to its exponent: {x: a, y: b}
Set the literal part of the monom. Must be a dictionary {x: Fraction, y: Fraction, ...}
Set the literal part of the monom from a string
String like x^2y^3
Expression to give to a plotting tool: explicit * between the coefficient and the variables.
LaTeX rendering of the current state (terminal output, not chainable).
Get the variables variables
Add multiple similar monoms to the current one.
The monoms to add.
True when an exponent is not an integer (x^(1/2)).
Copy the mathematical state (coefficient and literal part) of another
monom into this. Display state is not involved (Monom has none).
Entry point used to commit the result of an atomic operation.
Get the degree of a monom. If no variable is given, the result will be the global degree.
Optionalvariable: string
Letter whose power to return
Divide the current monoms by multiple monoms
The monoms to divide by.
Evaluate a monom. Every variable of the monom must be assigned in values;
extra entries in values (variables not present in the monom) are ignored.
Dictionary of <variable: Fraction | number>, or a scalar assigned to the monom's single variable.
When true, returns a primitive number instead of a Fraction.
Evaluate a monom. Every variable of the monom must be assigned in values;
extra entries in values (variables not present in the monom) are ignored.
Dictionary of <variable: Fraction | number>, or a scalar assigned to the monom's single variable.
OptionalasNumeric: false
When true, returns a primitive number instead of a Fraction.
Evaluate a monom. Every variable of the monom must be assigned in values;
extra entries in values (variables not present in the monom) are ignored.
Dictionary of <variable: Fraction | number>, or a scalar assigned to the monom's single variable.
OptionalasNumeric: boolean
When true, returns a primitive number instead of a Fraction.
Determine if a monom contains a variable in its literal part
Definite integral between a and b, as a fraction: primitive(b) - primitive(a).
Optionalvariable: string
integration variable (default x).
for a power of -1 of the variable (see primitive).
Replace the monom by its inverse: inverse the coefficient and negate every exponent. The inverse of zero has an infinite coefficient; it does not throw.
True when div divides the monom: each variable of div has at least the same exponent here, and the
quotient of the coefficients is an integer (a coefficient with a fractional part is not checked).
True when every exponent is an even integer (x^4y^2).
Determine if the monom is one
True when the coefficient is a perfect square and every exponent is an even integer.
Determine if the monom is null
Multiply multiple monoms into the current monom
The monoms to multiply by.
Create a one value monom
Get the opposite Returns a monom.
Route an input to the matching from*** builder. Same-type inputs are
copied; every other shape delegates without inlining construction logic.
Primitive with respect to a variable (integration constant omitted). The primitive of the zero monom is the zero monom.
Reduce the coefficient and remove the variables whose exponent is zero.
Remove a variable from the literal part. Nothing happens when the variable is absent.
Set the exponent of a particular variable.
variable whose exponent to change
exponent to assign to the variable; zero removes the variable
Return the square root of a monom. The literal part always admits a square root (halving each power, rational powers allowed), so only the coefficient constrains the result.
Subtract multiple similar monoms from the current one.
The monoms to subtract
Create a zero value monom
StaticfromStaticfromBuild a monom from an explicit coefficient and literal part. The literal Fractions are cloned to avoid aliasing the caller's dictionary.
StaticfromStaticfromBuild a monom from a string. A purely numeric string is a constant monom; any other string is parsed as an algebraic expression.
StaticgcdStaticx
A term
k · x^a · y^b: a Fraction coefficient and a literal part, a dictionary from each variable to its exponent (aFractiontoo, sox^(1/2)is allowed). Built from a string ("3x^2y"), a number or a fraction. A string must be a single term: spaces are ignored, but a sum or a difference ("3x+2"), a missing operand ("3x*") or a negative exponent without parentheses ("x^-1", write"x^(-1)") throws aParseError.Example