Grade SymPy's precomputed outcome the same way (its roots are real numeric, * sourced from solve()/mpmath — trusted sound).
(c: Case)
| 102 | if (guardSym === 'False') { |
| 103 | vacuous++; |
| 104 | continue; |
| 105 | } |
| 106 | root = rawRoot.op1; |
| 107 | } |
| 108 | const rv = realOf(root); |
| 109 | if (rv === null) continue; // complex / unevaluable root — ignore for real grading |
| 110 | let res: number | null = null; |
| 111 | try { |
| 112 | res = realOf(resid.subs({ [c.ce.var]: root })); |
| 113 | } catch { |