Problem
Absolute-value notation with ASCII bars is left intact by normalize_math_answer, and the unboxed extract path reads the signed interior:
extract_last_number("|-3|") # "-3"
normalize_math_answer("|-3|") # "|-3|"
score_text("math500", "|-3|", "-3") # 1.0 FALSE POSITIVE vs signed gold
score_text("math500", "|-3|", "3") # 0.0 FALSE NEGATIVE
score_text("math500", r"\boxed{|-3|}", "3") # 0.0
Expected
|-3| / \boxed{|-3|} grades equal to 3 (and not to -3).
Environment
Problem
Absolute-value notation with ASCII bars is left intact by
normalize_math_answer, and the unboxed extract path reads the signed interior:Expected
|-3|/\boxed{|-3|}grades equal to3(and not to-3).Environment