Integer number theory
All functions take and return Expression objects holding integer leaves,
so arbitrary precision flows through the existing machinery; passing a
non-integer expression raises. (Exception: continued_fraction_rational
also accepts rational leaves; the three symbol functions return plain
machine integers.)
is_prime#
Raw WebAssembly: Default context
isPrime(n: Expression): boolean | undefinedCalling forms
Raw WebAssembly: Explicit context: Context.isPrime
isPrime(n: Expression): boolean | undefinedExpression method: Expression.isPrime
isPrime(): boolean | nullRaw WebAssembly: Expression method: Expression.isPrime
isPrime(): boolean | undefinedDeterministic primality verdict; None when the input is outside the
classifier's domain (e.g. not a natural number representation it
handles).
factor_integer#
Not exposed by the WASM / JavaScript bindings. Available as Context.factor_integer in Python, UniffiSession.factorInteger in Kotlin, UniffiSession.factorInteger in Swift, api::Session::factor_integer in Rust.
Prime factorization as (prime, multiplicity) pairs, ascending. Errors on
zero. Notes: WASM returns PrimeFactor objects with
prime/multiplicity getters; the sign of a negative input is carried
as a leading (-1, 1) factor exactly as the core reports it.
prime_factor (WASM result class)#
prime#
Raw WebAssembly: PrimeFactor property
readonly prime: ExpressionThe prime.
multiplicity#
Raw WebAssembly: PrimeFactor property
readonly multiplicity: numberCalling forms and variants
Variant for this object — Raw WebAssembly: RootMultiplicity property: RootMultiplicity.multiplicity
readonly multiplicity: numberinteger_gcd#
Not exposed by the WASM / JavaScript bindings. Available as Context.integer_gcd in Python, UniffiSession.integerGcd in Kotlin, UniffiSession.integerGcd in Swift, api::Session::integer_gcd in Rust.
Greatest common divisor (non-negative).
integer_lcm#
Not exposed by the WASM / JavaScript bindings. Available as Context.integer_lcm in Python, UniffiSession.integerLcm in Kotlin, UniffiSession.integerLcm in Swift, api::Session::integer_lcm in Rust.
Least common multiple.
extended_euclidean#
Not exposed by the WASM / JavaScript bindings. Available as Context.extended_euclidean in Python, UniffiSession.extendedEuclidean in Kotlin, UniffiSession.extendedEuclidean in Swift, api::number_theory::Session::extended_euclidean in Rust.
(gcd, x, y) with . Notes: WASM returns a 3-element
array [gcd, x, y].
modular_power#
Not exposed by the WASM / JavaScript bindings. Available as Context.modular_power in Python, UniffiSession.modularPower in Kotlin, UniffiSession.modularPower in Swift, api::number_theory::Session::modular_power in Rust.
base^exponent mod modulus by square-and-multiply; requires positive
modulus and non-negative exponent.
modular_inverse#
Not exposed by the WASM / JavaScript bindings. Available as Context.modular_inverse in Python, UniffiSession.modularInverse in Kotlin, UniffiSession.modularInverse in Swift, api::number_theory::Session::modular_inverse in Rust.
Multiplicative inverse of value modulo modulus; errors when
.
chinese_remainder#
Not exposed by the WASM / JavaScript bindings. Available as Context.chinese_remainder in Python, UniffiSession.chineseRemainder in Kotlin, UniffiSession.chineseRemainder in Swift, api::number_theory::Session::chinese_remainder in Rust.
The smallest non-negative solution of the simultaneous congruences
. Moduli need not be pairwise coprime; inconsistent systems
raise. Notes: WASM passes a flat interleaved array
[residue_0, modulus_0, ...].
euler_totient#
Not exposed by the WASM / JavaScript bindings. Available as Context.euler_totient in Python, UniffiSession.eulerTotient in Kotlin, UniffiSession.eulerTotient in Swift, api::number_theory::Session::euler_totient in Rust.
Euler's ; requires a positive integer.
mobius#
Raw WebAssembly: Default context
mobius(n: Expression): ExpressionMöbius ; requires a positive integer.
divisor_count#
Not exposed by the WASM / JavaScript bindings. Available as Context.divisor_count in Python, UniffiSession.divisorCount in Kotlin, UniffiSession.divisorCount in Swift, api::Session::divisor_count in Rust.
Number of positive divisors .
divisor_sigma#
Not exposed by the WASM / JavaScript bindings. Available as Context.divisor_sigma in Python, UniffiSession.divisorSigma in Kotlin, UniffiSession.divisorSigma in Swift, api::Session::divisor_sigma in Rust.
Sum of the power-th powers of the positive divisors ;
power = 0 gives divisor_count, power = 1 the divisor sum.
jacobi_symbol#
Not exposed by the WASM / JavaScript bindings. Available as Context.jacobi_symbol in Python, UniffiSession.jacobiSymbol in Kotlin, UniffiSession.jacobiSymbol in Swift, api::Session::jacobi_symbol in Rust.
The Jacobi symbol ; the denominator must be a positive odd integer.
legendre_symbol#
Not exposed by the WASM / JavaScript bindings. Available as Context.legendre_symbol in Python, UniffiSession.legendreSymbol in Kotlin, UniffiSession.legendreSymbol in Swift, api::Session::legendre_symbol in Rust.
The Legendre symbol; the second argument must be an odd prime.
kronecker_symbol#
Not exposed by the WASM / JavaScript bindings. Available as Context.kronecker_symbol in Python, UniffiSession.kroneckerSymbol in Kotlin, UniffiSession.kroneckerSymbol in Swift, api::Session::kronecker_symbol in Rust.
The Kronecker extension of the Jacobi symbol to all integer denominators.
integer_square_root#
Not exposed by the WASM / JavaScript bindings. Available as Context.integer_square_root in Python, UniffiSession.integerSquareRoot in Kotlin, UniffiSession.integerSquareRoot in Swift, api::Session::integer_square_root in Rust.
for non-negative n.
integer_nth_root#
Not exposed by the WASM / JavaScript bindings. Available as Context.integer_nth_root in Python, UniffiSession.integerNthRoot in Kotlin, UniffiSession.integerNthRoot in Swift, api::Session::integer_nth_root in Rust.
; odd indices accept negative n. Errors when no real root exists (even index, negative n).
continued_fraction_rational#
Not exposed by the WASM / JavaScript bindings. Available as Context.continued_fraction_rational in Python, UniffiSession.continuedFractionRational in Kotlin, UniffiSession.continuedFractionRational in Swift, api::number_theory::Session::continued_fraction_rational in Rust.
Terminating continued-fraction expansion [a0; a1, a2, ...] of an integer
or rational expression leaf.
continued_fraction_quadratic_irrational#
Not exposed by the WASM / JavaScript bindings. Available as Context.continued_fraction_quadratic_irrational in Python, UniffiSession.continuedFractionQuadraticIrrational in Kotlin, UniffiSession.continuedFractionQuadraticIrrational in Swift, api::number_theory::Session::continued_fraction_quadratic_irrational in Rust.
Eventually-periodic expansion of for a non-negative integer d, returned
as (initial_terms, periodic_part). Perfect squares give a one-element
initial part and an empty period. Notes: WASM returns a
QuadraticContinuedFractionExpansion object with
initial_terms/periodic_terms getters.
quadratic_continued_fraction_expansion (WASM result class)#
initial_terms#
Not exposed by the WASM / JavaScript bindings. Available as UniffiQuadraticContinuedFractionExpansion.initialTerms in Kotlin, UniffiQuadraticContinuedFractionExpansion.initialTerms in Swift, api::results::QuadraticContinuedFractionExpansion::initial_terms in Rust.
periodic_terms#
Not exposed by the WASM / JavaScript bindings. Available as UniffiQuadraticContinuedFractionExpansion.periodicTerms in Kotlin, UniffiQuadraticContinuedFractionExpansion.periodicTerms in Swift, api::results::QuadraticContinuedFractionExpansion::periodic_terms in Rust.
Diophantine equations#
The two supported Diophantine subclasses are linear equations via the extended Euclidean algorithm and Pell's equation via the continued fraction of . General Diophantine solving is undecidable (Matiyasevich–Robinson–Davis–Putnam) and is out of scope; the solvers return exact integers and never guess.
solve_linear_diophantine#
Not exposed by the WASM / JavaScript bindings. Available as Context.solve_linear_diophantine in Python, UniffiSession.solveLinearDiophantine in Kotlin, UniffiSession.solveLinearDiophantine in Swift, api::number_theory::Session::solve_linear_diophantine in Rust.
General integer solution of , returned as the parametric
coordinates — one expression per unknown, affine in fresh integer parameter
symbols (diophantine_parameter_k) shared across the coordinates so that
choosing any integers for the parameters yields a solution tuple. The list is
empty only when the equation provably has no integer solution
(). When every coefficient and the constant are zero, each
coordinate is its own fresh integer parameter. All coefficients and the constant
must be integer expression leaves; any other input, including an empty coefficient
list, raises a declined-computation error instead of returning an empty list.
solve_linear_diophantine_system#
Not exposed by the WASM / JavaScript bindings. Available as Context.solve_linear_diophantine_system in Python, UniffiSession.solveLinearDiophantineSystem in Kotlin, UniffiSession.solveLinearDiophantineSystem in Swift, api::number_theory::Session::solve_linear_diophantine_system in Rust.
General integer solution of the rectangular system , returned as one
parametric coordinate expression per column of A. The coordinates share fresh
integer parameter symbols and describe the complete affine integer lattice of
solutions. The list is empty only when the system provably has no integer
solution. A row count of A that differs from the number of constants raises a
length-mismatch error, and an entry that is not an integer expression leaf raises
a declined-computation error.
solve_pell#
Not exposed by the WASM / JavaScript bindings. Available as Context.solve_pell in Python, UniffiSession.solvePell in Kotlin, UniffiSession.solvePell in Swift, api::number_theory::Session::solve_pell in Rust.
Fundamental solution [x, y] of for a positive non-square
integer D, the smallest positive solution from which all others are generated
by the recurrence , . The list is
empty when D is a perfect square or non-positive (no nontrivial fundamental
solution). A radicand that is not an exact integer raises an integer-required
error.
solve_negative_pell#
Not exposed by the WASM / JavaScript bindings. Available as Context.solve_negative_pell in Python, UniffiSession.solveNegativePell in Kotlin, UniffiSession.solveNegativePell in Swift, api::number_theory::Session::solve_negative_pell in Rust.
Fundamental solution [x, y] of the negative-Pell equation
when it is solvable (exactly when the continued fraction of has odd period),
and an empty list for an integer D for which it is not. A radicand that is not an
exact integer raises an integer-required error.
pell_solutions#
Not exposed by the WASM / JavaScript bindings. Available as Context.pell_solutions in Python, UniffiSession.pellSolutions in Kotlin, UniffiSession.pellSolutions in Swift, api::number_theory::Session::pell_solutions in Rust.
The first count positive solutions of , materialised from the
fundamental solution by the Pell recurrence and returned as a flat list
. Empty when the integer D has no fundamental
solution; a radicand that is not an exact integer raises an integer-required error.
Integer-domain solving#
solve_integers is the deliberate integer-domain solver. It takes a conjunction of
equations and linear congruences in an ordered list of integer unknowns, and either
states the complete integer solution set or declines with a typed reason. It never
returns a few sampled solutions as if they were all of them, and it never reports
"no solution" for a problem it could not decide. General Diophantine equations are
undecidable, so the accepted classes are deliberately narrow:
| Request | Result |
|---|---|
| One unknown, rational-coefficient polynomial or rational equations | finite, empty, or lattice_family (every integer except undefined_points) |
| One unknown, linear congruences, with or without equations | congruence_family (one residue class), finite, or empty |
| Several unknowns, affine equations and congruences | lattice_family, finite, or empty, by Smith normal form |
Two unknowns, one equation a*x^2 + b*y^2 + c = 0 reducing to x^2 - D*y^2 = N |
pell_orbits, finite, or empty |
| Anything else, including symbolic parameters | declined with unsupported_class |
solve_integers#
Raw WebAssembly: Default context
solveIntegers(
equations: Expression[],
unknowns: string[],
congruences: Expression[],
moduli: Expression[],
maximum_seed_candidates: number,
maximum_integer_bits: number,
): IntegerSolveReportCalling forms
Raw WebAssembly: Explicit context: Context.solveIntegers
solveIntegers(
equations: Expression[],
unknowns: string[],
congruences: Expression[],
moduli: Expression[],
maximum_seed_candidates: number,
maximum_integer_bits: number,
): IntegerSolveReportEach equation is an equation or an expression meaning expression = 0. Congruence
i states that congruences[i] vanishes modulo the positive integer moduli[i];
congruences are passed through this typed boundary, never parsed from mod syntax,
and must be affine with integer coefficients. An empty or repeated unknown list, a
moduli list of a different length, a modulus that is not a positive integer, and a
zero limit are errors, not declines.
Every report that is not declined reads the same way. The integer solutions are
exactly the tuples obtained by substituting integers for parameters into one of the
solutions, other than the undefined_points. The three kinds of answer are kept
apart:
finiteandemptyhave no parameters:solutionsis the whole enumerated set, and an empty list is a proof of no solution.lattice_familyandcongruence_familyare unbounded integer parameter families:6*x + 9*y = 21gives one tuple affine in one parameter, with itslattice_particularpoint and Hermite-reducedlattice_basis; givesx = 4 + 5*kwithresidue4 andmodulus5.pell_orbitsis a union of orbits under multiplication by the norm-one unit, not a list of samples.x^2 - 5*y^2 = 4reports itspell_equation, the unit(9, 4), one seed per orbit, and two closed-form tuples per seed, one for each sign, exact in an integer exponentk. Every orbit is covered because each solution has exactly one representative in the unit's fundamental interval, and the scan of that interval is exhaustive.
Source definedness is kept: 1/(x - 1) = 0 is empty, and undefined_points still
lists 1. A request whose proof would exceed a limit declines rather than returning
part of the answer: a generalized Pell scan needing more than
maximum_seed_candidates ordinates declines with seed_candidate_limit, and an
integer or unit longer than maximum_integer_bits bits declines with
integer_size_limit or fundamental_unit_limit. x^3 + y^3 + z^3 = 3 declines with
unsupported_class. Python returns a dictionary with one key per report field below;
WASM, Kotlin, and Swift return an IntegerSolveReport object.
IntegerSolveReport#
Not exposed by the WASM / JavaScript bindings. Available as api::IntegerSolveReport in Rust.
What solve_integers returns. complete is false only for a declined report.
integer_report_verdict#
Raw WebAssembly: IntegerSolveReport property
readonly verdict: stringGetter on IntegerSolveReport: finite, empty, lattice_family,
congruence_family, pell_orbits, or declined.
integer_report_complete#
Raw WebAssembly: IntegerSolveReport property
readonly complete: booleanGetter on IntegerSolveReport: whether the report states the whole integer solution
set.
integer_report_unknowns#
Raw WebAssembly: IntegerSolveReport property
readonly unknowns: Expression[]Getter on IntegerSolveReport: the requested unknowns, in the order every tuple uses.
integer_report_solutions#
Raw WebAssembly: IntegerSolveReport property
readonly solutions: IntegerSolutionTuple[]Getter on IntegerSolveReport: the solution tuples, exact in the integer parameters.
integer_report_parameters#
Raw WebAssembly: IntegerSolveReport property
readonly parameters: Expression[]Getter on IntegerSolveReport: the parameters of the solution tuples, each ranging
over every integer.
integer_report_undefined_points#
Raw WebAssembly: IntegerSolveReport property
readonly undefinedPoints: IntegerSolutionTuple[]Getter on IntegerSolveReport: the integer points at which some source equation is
undefined. No solution is one of them.
integer_report_lattice_particular#
Raw WebAssembly: IntegerSolveReport property
readonly latticeParticular: IntegerSolutionTuple | undefinedGetter on IntegerSolveReport: one point of the solution lattice of a
lattice_family report.
integer_report_lattice_basis#
Raw WebAssembly: IntegerSolveReport property
readonly latticeBasis: IntegerSolutionTuple[]Getter on IntegerSolveReport: a Hermite-reduced basis of the direction lattice of a
lattice_family report.
integer_report_residue#
Raw WebAssembly: IntegerSolveReport property
readonly residue: Expression | undefinedGetter on IntegerSolveReport: the least nonnegative member of the class of a
congruence_family report.
integer_report_modulus#
Raw WebAssembly: IntegerSolveReport property
readonly modulus: Expression | undefinedGetter on IntegerSolveReport: the positive modulus of the class of a
congruence_family report.
integer_report_pell_equation#
Raw WebAssembly: IntegerSolveReport property
readonly pellEquation: Expression | undefinedGetter on IntegerSolveReport: the normalized equation x^2 - D*y^2 = N of a
pell_orbits report, written in the unknowns.
integer_report_pell_unit#
Raw WebAssembly: IntegerSolveReport property
readonly pellUnit: IntegerSolutionTuple | undefinedGetter on IntegerSolveReport: the fundamental solution (u, v) of
u^2 - D*v^2 = 1 that generates every orbit.
integer_report_pell_seeds#
Raw WebAssembly: IntegerSolveReport property
readonly pellSeeds: IntegerSolutionTuple[]Getter on IntegerSolveReport: one seed per orbit, in the order of the requested
unknowns.
integer_report_proof_methods#
Raw WebAssembly: IntegerSolveReport property
readonly proofMethods: string[]Getter on IntegerSolveReport: the kinds of exact evidence the result rests on, such
as integer_root_theorem, chinese_remainder, smith_normal_form, or
pell_fundamental_interval.
integer_report_decline_reason#
Raw WebAssembly: IntegerSolveReport property
readonly declineReason: string | undefinedGetter on IntegerSolveReport: why the solve made no claim, present exactly when the
verdict is declined.
IntegerSolutionTuple#
Not exposed by the WASM / JavaScript bindings. Available as api::IntegerSolutionTuple in Rust.
One exact tuple of a report, with one coordinate per requested unknown.
integer_tuple_coordinates#
Raw WebAssembly: IntegerSolutionTuple property
readonly coordinates: Expression[]Getter on IntegerSolutionTuple: the coordinates, in the order of the requested
unknowns.
Example#
This family is not part of the recommended JavaScript facade in this release. Call it through the generated symi.raw layer, whose entries are listed with their wasm-bindgen signatures above, and read Migration for the ownership rules that apply there.
Additional API#
chineseRemainder#
Raw WebAssembly: Default context
chineseRemainder(residues_and_moduli: Expression[]): ExpressionThe smallest non-negative solution of the simultaneous congruences .
Calling forms
Raw WebAssembly: Explicit context: Context.chineseRemainder
chineseRemainder(residues_and_moduli: Expression[]): ExpressioncontinuedFractionQuadraticIrrational#
Raw WebAssembly: Default context
continuedFractionQuadraticIrrational(value: Expression): QuadraticContinuedFractionExpansionEventually-periodic expansion of for a non-negative integer d, returned as (initial_terms, periodic_part).
Calling forms
Raw WebAssembly: Explicit context: Context.continuedFractionQuadraticIrrational
continuedFractionQuadraticIrrational(value: Expression): QuadraticContinuedFractionExpansioncontinuedFractionRational#
Raw WebAssembly: Default context
continuedFractionRational(value: Expression): Expression[]Terminating continued-fraction expansion [a0; a1, a2, ...] of an integer or rational expression leaf.
Calling forms
Raw WebAssembly: Explicit context: Context.continuedFractionRational
continuedFractionRational(value: Expression): Expression[]divisorCount#
Raw WebAssembly: Default context
divisorCount(n: Expression): ExpressionNumber of positive divisors .
Calling forms
Raw WebAssembly: Explicit context: Context.divisorCount
divisorCount(n: Expression): ExpressiondivisorSigma#
Raw WebAssembly: Default context
divisorSigma(n: Expression, power: number): ExpressionSum of the power-th powers of the positive divisors ; power = 0 gives divisor_count, power = 1 the divisor sum.
Calling forms
Raw WebAssembly: Explicit context: Context.divisorSigma
divisorSigma(n: Expression, power: number): ExpressioneulerTotient#
Raw WebAssembly: Default context
eulerTotient(n: Expression): ExpressionEuler's ; requires a positive integer.
Calling forms
Raw WebAssembly: Explicit context: Context.eulerTotient
eulerTotient(n: Expression): ExpressionextendedEuclidean#
Raw WebAssembly: Default context
extendedEuclidean(a: Expression, b: Expression): Expression[](gcd, x, y) with .
Calling forms
Raw WebAssembly: Explicit context: Context.extendedEuclidean
extendedEuclidean(a: Expression, b: Expression): Expression[]factorInteger#
Raw WebAssembly: Default context
factorInteger(n: Expression): PrimeFactor[]Prime factorization as (prime, multiplicity) pairs, ascending. Errors on zero. Notes: WASM returns prime_factor objects with prime/multiplicity getters; the sign of a negative input is carried as a leading (-1, 1) factor exactly as the core reports it.
Calling forms
Raw WebAssembly: Explicit context: Context.factorInteger
factorInteger(n: Expression): PrimeFactor[]integerGcd#
Raw WebAssembly: Default context
integerGcd(a: Expression, b: Expression): ExpressionGreatest common divisor (non-negative).
Calling forms
Raw WebAssembly: Explicit context: Context.integerGcd
integerGcd(a: Expression, b: Expression): ExpressionintegerLcm#
Raw WebAssembly: Default context
integerLcm(a: Expression, b: Expression): ExpressionLeast common multiple.
Calling forms
Raw WebAssembly: Explicit context: Context.integerLcm
integerLcm(a: Expression, b: Expression): ExpressionintegerNthRoot#
Raw WebAssembly: Default context
integerNthRoot(n: Expression, root_index: bigint): Expression; odd indices accept negative n. Errors when no real root exists (even index, negative n).
Calling forms
Raw WebAssembly: Explicit context: Context.integerNthRoot
integerNthRoot(n: Expression, root_index: bigint): ExpressionintegerSquareRoot#
Raw WebAssembly: Default context
integerSquareRoot(n: Expression): Expressionfor non-negative n.
Calling forms
Raw WebAssembly: Explicit context: Context.integerSquareRoot
integerSquareRoot(n: Expression): ExpressionjacobiSymbol#
Raw WebAssembly: Default context
jacobiSymbol(numerator: Expression, denominator: Expression): numberThe Jacobi symbol ; the denominator must be a positive odd integer.
Calling forms
Raw WebAssembly: Explicit context: Context.jacobiSymbol
jacobiSymbol(numerator: Expression, denominator: Expression): numberkroneckerSymbol#
Raw WebAssembly: Default context
kroneckerSymbol(numerator: Expression, denominator: Expression): numberThe Kronecker extension of the Jacobi symbol to all integer denominators.
Calling forms
Raw WebAssembly: Explicit context: Context.kroneckerSymbol
kroneckerSymbol(numerator: Expression, denominator: Expression): numberlegendreSymbol#
Raw WebAssembly: Default context
legendreSymbol(numerator: Expression, prime: Expression): numberThe Legendre symbol; the second argument must be an odd prime.
Calling forms
Raw WebAssembly: Explicit context: Context.legendreSymbol
legendreSymbol(numerator: Expression, prime: Expression): numbermodularInverse#
Raw WebAssembly: Default context
modularInverse(value: Expression, modulus: Expression): ExpressionMultiplicative inverse of value modulo modulus; errors when .
Calling forms
Raw WebAssembly: Explicit context: Context.modularInverse
modularInverse(value: Expression, modulus: Expression): ExpressionmodularPower#
Raw WebAssembly: Default context
modularPower(
base: Expression,
exponent: Expression,
modulus: Expression,
): Expressionbase^exponent mod modulus by square-and-multiply; requires positive modulus and non-negative exponent.
Calling forms
Raw WebAssembly: Explicit context: Context.modularPower
modularPower(
base: Expression,
exponent: Expression,
modulus: Expression,
): ExpressionpellSolutions#
Raw WebAssembly: Default context
pellSolutions(radicand: Expression, count: number): Expression[]The first count positive solutions of , materialised from the fundamental solution by the Pell recurrence and returned as a flat list .
Calling forms
Raw WebAssembly: Explicit context: Context.pellSolutions
pellSolutions(radicand: Expression, count: number): Expression[]solveLinearDiophantine#
Raw WebAssembly: Default context
solveLinearDiophantine(
coefficients: Expression[],
constant: Expression,
): Expression[]General integer solution of , returned as the parametric coordinates — one expression per unknown, affine in fresh integer parameter symbols (diophantine_parameter_k) shared across the coordinates so that choosing any integers for the parameters yields a solution tuple. The list is empty when the equation has no integer solution ().
Calling forms
Raw WebAssembly: Explicit context: Context.solveLinearDiophantine
solveLinearDiophantine(
coefficients: Expression[],
constant: Expression,
): Expression[]solveLinearDiophantineSystem#
Raw WebAssembly: Default context
solveLinearDiophantineSystem(
coefficient_matrix: Matrix,
constants: Expression[],
): Expression[]General integer solution of the rectangular system , returned as one parametric coordinate expression per column of A.
Calling forms
Raw WebAssembly: Explicit context: Context.solveLinearDiophantineSystem
solveLinearDiophantineSystem(
coefficient_matrix: Matrix,
constants: Expression[],
): Expression[]solveNegativePell#
Raw WebAssembly: Default context
solveNegativePell(radicand: Expression): Expression[]Fundamental solution [x, y] of the negative-Pell equation when it is solvable (exactly when the continued fraction of has odd period), and an empty list otherwise.
Calling forms
Raw WebAssembly: Explicit context: Context.solveNegativePell
solveNegativePell(radicand: Expression): Expression[]solvePell#
Raw WebAssembly: Default context
solvePell(radicand: Expression): Expression[]Fundamental solution [x, y] of for a positive non-square integer D, the smallest positive solution from which all others are generated by the recurrence , .
Calling forms
Raw WebAssembly: Explicit context: Context.solvePell
solvePell(radicand: Expression): Expression[]QuadraticContinuedFractionExpansion#
QuadraticContinuedFractionExpansion.initialTerms#
Raw WebAssembly: QuadraticContinuedFractionExpansion property
readonly initialTerms: Expression[]The terms preceding the periodic part of the expansion.
QuadraticContinuedFractionExpansion.periodicTerms#
Raw WebAssembly: QuadraticContinuedFractionExpansion property
readonly periodicTerms: Expression[]The repeating terms of the expansion.
RootMultiplicity#
RootMultiplicity.root#
Raw WebAssembly: RootMultiplicity property
readonly root: ExpressionPrincipal n-th root, stored as x^(1/n).