Skip to content

fix(scoring): treat \sqrt[n]{x} as one term and value-normalize#486

Open
marktech0813 wants to merge 1 commit into
James-CUDA:mainfrom
marktech0813:fix/483-nth-root-sqrt
Open

fix(scoring): treat \sqrt[n]{x} as one term and value-normalize#486
marktech0813 wants to merge 1 commit into
James-CUDA:mainfrom
marktech0813:fix/483-nth-root-sqrt

Conversation

@marktech0813

Copy link
Copy Markdown
Contributor

Summary

  • _iter_latex_frac_sqrt_spans / extract now skip the optional [n] index so \sqrt[3]{8} is one term (not digit 8).
  • normalize_math_answer folds \sqrt[n]{x}(x)^(1/(n)) so sympy equates gold 2.
  • Pins ruff <0.16 and completes DROP leading-decimal edge-strip so main CI stays green.

Fixes #483

Test plan

  • pytest tests/test_reward_nth_root_sqrt.py
  • CI green on this PR

Made with Cursor

Indexed roots previously skipped the optional [n] index, so extract
read the radicand digit and boxed forms never equated to simplified gold (James-CUDA#483).

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

[bug] MATH grader: \sqrt[n]{x} is read as operand digit x — cube root FP/FN (sibling of #419)

1 participant