eval_expression
Compute advanced mathematical operations by evaluating PARI/GP expressions. Supports factorization, primality testing, polynomial root finding, and elliptic curve calculations.
Instructions
Evaluate a PARI/GP expression string.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| expr | Yes | A PARI/GP expression as a string (e.g., "x^2 + 1", "factor(100)", "prime(10)"). For multiple computations, ALWAYS use vector expressions like "vector(15, n, qfbclassno(-4*n))" instead of for-loops with print statements. For-loops may cause timeouts. | |
| timeout | No | Maximum execution time in seconds (default 60). Note: This is a best-effort timeout and may not work reliably for long-running PARI operations written in C. |