Skip to content

Updated to Python 3.12#247

Open
m-messer wants to merge 13 commits into
mainfrom
feature/python312
Open

Updated to Python 3.12#247
m-messer wants to merge 13 commits into
mainfrom
feature/python312

Conversation

@m-messer
Copy link
Copy Markdown
Member

Changed to support Python 3.12.

m-messer and others added 9 commits March 20, 2026 16:10
Added ∞ as an alias for oo so students can use the Unicode infinity
symbol as input. Fixed comparison of infinite expressions by using
direct sympy comparison instead of subtraction, since oo - oo yields
nan rather than 0.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@m-messer
Copy link
Copy Markdown
Member Author

m-messer commented May 9, 2026

Database testing conducted on 1000 samples: https://github.com/lambda-feedback/compareExpressions/actions/runs/25685183796/job/75406915338

13 errors out of 1000.

  1. E^{x log x} ( log x + 1) could not be parsed as a valid mathematical expression. Ensure that the correct codes for input symbols are used, that the correct notation is used, that the expression is unambiguous and that all parentheses are closed.
  • Issue with parsing ln exists in Python 3.8
  1. Grade Mistmatch eval reports True, DB is false - Answer: 1/(1+GpGc)*D+GpGc/(1+GpGc)*R -- Response: (GcGpR+D)/(1+GcGp)
  • These are equal, so the data is incorrect, and the evaluation function fixes an old issue
  1. Schema validation: None should not be valid under {'type': 'null'}
  • response is null
  1. 2x \ cos(x^{2}) could not be parsed as a valid mathematical expression. Ensure that the correct codes for input symbols are used, that the correct notation is used, that the expression is unambiguous and that all parentheses are closed.
  • Answer is written in LaTeX when it should be written in Sympy
  1. -Grade Mistmatch eval reports True, DB is false - Answer: c_1*x**(m_1) + c_2*x**(m_1)*ln(x) -- Response (c_1+ log(x) c_1)x^(m_1)
  • These are equal (input symbols define c_1 with the alias c_2 and visa-versa for c_2
  1. 0.5waa could not be parsed as a valid mathematical expression. Ensure that correct codes for input symbols are used, correct notation is used, that the expression is unambiguous and that all parentheses are closed.
  • Cannot replicate, 0.5waa parses correctly
  1. 2x \ cos(x^{2}) could not be parsed as a valid mathematical expression. Ensure that correct codes for input symbols are used, correct notation is used, that the expression is unambiguous and that all parentheses are closed.
  • Same as 4
  1. Grade mismatch -- eval func True, db False -- Answer: -2 muA -- Response -2 μA
  • We added support for unicode greek letters
  1. Grade mismatch -- eval func True, db False -- Answer: 2(cos(pi/2)+isin(pi/2)) -- Response: 2( cos(π/2) + sin(π/2)*i)
  • Same as 8
  1. Grade mismatch -- eval func False, db True -- Answer: c_1*x**(m_1) + c_2*x**(m_1)*ln(x) -- Response: (c_2+c_2* log(x))x^m_1
  • These are not equal (even with the same input symbols as 5.) DB data marked correct is from an old bug
  1. \frac{1}{x \ log a} could not be parsed as a valid mathematical expression. Ensure that correct codes for input symbols are used, correct notation is used, that the expression is unambiguous and that all parentheses are closed.
  • LaTeX used for answer instead of Sympy
  1. Grade mismatch -- eval func False, db True -- Answer: 6(cos(5pi/6)+Isin(5pi/6)) -- Response: 6( cos(5π/6)+I sin(5π/6))
  • Same as 8
  1. Grade mismatch -- eval func False, db True -- Answer: mu+nu-lambda=0 -- Response: ν-λ+μ=0
  • Same as 8

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.

2 participants