Skip to content

Add Pell equation benchmark - #397

Open
alcides wants to merge 1 commit into
mainfrom
feat/mathematical-programming-examples
Open

Add Pell equation benchmark#397
alcides wants to merge 1 commit into
mainfrom
feat/mathematical-programming-examples

Conversation

@alcides

@alcides alcides commented Aug 17, 2026

Copy link
Copy Markdown
Owner

Adds a Pell equation benchmark for the positive solutions of x^2 - 2y^2 = 1.

  • Minimizes x + y after enforcing the equation
  • Uses (x, y) = (3, 2) as the optimum
  • Adds a standard example entry
  • Registers it in the benchmark suite and run_examples.sh
  • Adds tests

Signed integer solutions would make the sum unbounded below, so this benchmark uses the conventional positive Pell solutions.

Validation: uv run pytest tests/benchmarks/test_mathematical.py -q (6 passed); Ruff passes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant