https://github.com/gsganden/Math-Verify/blob/main/src/math_verify/grader.py#L659 is wrong: verify(sympy.Rational(1, 3), 0.333333) returns False. The single comparisons that verify does internally (https://github.com/gsganden/Math-Verify/blob/main/src/math_verify/grader.py#L667) always return False unless either both expressions are sympy objects or both expressions are strings.
This behavior makes sense on the assumption that the inputs to verify have gone through parse. I'd suggest updating the verify docstring to state this assumption and raising an error for any non-string, non-sympy inputs.
Would you like me to create a PR with these changes?
https://github.com/gsganden/Math-Verify/blob/main/src/math_verify/grader.py#L659 is wrong:
verify(sympy.Rational(1, 3), 0.333333)returnsFalse. The single comparisons thatverifydoes internally (https://github.com/gsganden/Math-Verify/blob/main/src/math_verify/grader.py#L667) always returnFalseunless either both expressions aresympyobjects or both expressions are strings.This behavior makes sense on the assumption that the inputs to
verifyhave gone throughparse. I'd suggest updating theverifydocstring to state this assumption and raising an error for any non-string, non-sympyinputs.Would you like me to create a PR with these changes?