Optionalvalue: Factor | InputAlgebra<Polynom>Optionalpower: InputValue<Fraction>Display option (default): a power is written (P)^{n}, a negative one with a negative exponent.
Chainable, kept by clone.
Display option: a fractional power is written as a radical (sqrt(P)) and a negative power as a fraction (1/(P)).
Chainable, kept by clone.
Display option: do not wrap the polynom in parentheses when the power is 1. PolyFactor sets it on a lone factor. Chainable, kept by clone.
ASCIIMath rendering of the current state (terminal output, not chainable).
Power of the factor, as a fraction (a copy). A negative power is a denominator in a PolyFactor.
LaTeX rendering of the current state (terminal output, not chainable).
Variables of the base polynom, sorted.
Copy the mathematical state of another instance into this (display
state is NOT transferred — the receiver keeps its own formatting). Entry
point used when constructing/parsing from a same-type input. Distinct from
clone. Classes without a real implementation throw
NotImplementedError.
Not available on a single factor: use getDerivativeFactors and compose through PolyFactor.
Expand the factor into a polynom (P^n with n a natural number).
Divide by a factor or a polynom: multiply by its inverse.
Value of the factor for given values of its variables: the polynom evaluated, then raised to the power.
a dictionary {x: 2}, or one value for a single-variable polynom.
true returns a number, otherwise the exact Fraction.
Value of the factor for given values of its variables: the polynom evaluated, then raised to the power.
a dictionary {x: 2}, or one value for a single-variable polynom.
OptionalasNumeric: false
true returns a number, otherwise the exact Fraction.
Value of the factor for given values of its variables: the polynom evaluated, then raised to the power.
a dictionary {x: 2}, or one value for a single-variable polynom.
OptionalasNumeric: boolean
true returns a number, otherwise the exact Fraction.
Chain-rule decomposition of P(x)^n: returns the factors whose product
equals d/dx[P^n].
[0] (constant)[P'(x)][n, P'(x), P(x)^(n−1)]Intended for use by PolyFactor.derivative, not for standalone consumption.
True when the base polynom contains the variable.
Negate the power (P^n becomes P^-n).
True when both factors have the same base polynom and the same power.
True when the base polynom is 1, or the power is zero.
True when the base polynom is the same; the power is ignored.
True when the base polynom is zero.
Multiply by another factor or polynom. Succeeds only when both share the same base polynomial; powers are added. Two single-monom factors with integer power 1 are multiplied directly as polynomials.
Set the factor to 1.
Replace the factor by a factor, a polynom or a string. When power is given, the power of the result is
multiplied by it.
Optionalpower: InputValue<Fraction>Divide the power by value (the square root of P^2 is P^1).
Square root: divide the power by 2.
Set the factor to 0.
StaticcheckTrue when the string has no + or - outside the parentheses, so it reads as a product of factors.
StaticfactorsParse a product string into an array of Factor instances.
Supported format: parenthesised terms with optional powers and implicit
multiplication, e.g. "(3x+2)^2*(x-1)" or "(x+1)(x-1)^(1/2)".
Non-parenthesised tokens (e.g. "3x") are treated as a single factor
with implicit power ±1.
when false, all parsed powers are negated (denominator use).
StaticfromBuild a factor of power 1 from a polynom, or from anything a polynom accepts.
StaticfromBuild a factor from a string such as "(x+1)^2". Only the first factor of a product is kept: use
factorsFromString to get all of them.
Represents a single factor
P(x)^nin a factored polynomial expression.Factoris designed to be used as a building block inside PolyFactor, not as a standalone expression type. SeveralIExpressionoperations (add,subtract,opposite,reduce,primitive,derivative) are structurally unsupported at this level and will throw UnsupportedOperationError.