This entry is documented with its primary interface. Open the documentation →
nerdamer.gcd
nerdamer.gcd(x: ExpressionInput, y: ExpressionInput): ExpressionComputes a symbolic greatest common divisor over rational polynomial structure.
Numerators and denominators are polynomialized before exact sparse integer GCD
reconstruction. Rational polynomial coefficients are cleared to integers and
their shared clearing denominator is restored afterward. Function-valued,
exponential, and irrational constants use the existing polynomialization
substitutions and are restored after the numerator and denominator GCDs are
combined. For supported univariate polynomials with exact coefficients in
Q(i), a separate Euclidean GCD path treats i as an algebraic coefficient
satisfying i² = -1 rather than an independent polynomial variable.
Unsupported inputs remain symbolic as gcd(x, y) where the existing
polynomial fallback cannot handle them.
Parameters
| Name | Type | Description |
|---|---|---|
x | ExpressionInput | First expression-compatible operand. |
y | ExpressionInput | Second expression-compatible operand. |
Returns
Expression — The exact symbolic GCD or an unevaluated gcd expression.
