His fingers hovered over the keyboard. Question 4: Solve for x and y: 3x + 2y = 16, 4x – 2y = 2.
That night, he didn’t sleep. He opened the browser’s developer console—a terrifying grid of code he usually avoided—and started tracing the network requests. Every time he submitted an answer, a little packet of data flew from his laptop to the Sparx servers and came back with a verdict: PASS or FAIL. But the FAIL was not based on correct maths. It was based on a floating-point comparison that had a 0.001 tolerance—except someone had written if (Math.abs(userAnswer - correctAnswer) < 0.001) when they should have written <= for boundary cases. And worse, the server was rounding the correct answer to 3 decimal places before comparison, but using 5 decimal places for the user’s answer. sparx. maths
DING. “Correct! Great work, champion!” His fingers hovered over the keyboard
But the guilt grew. One night, he sat with Blobbert in the dark and whispered, “If I fix the answers but don’t learn anything, am I any better than a calculator?” It was based on a floating-point comparison that had a 0
“It’s not that I can’t do maths,” Leo muttered to his only ally, a crusty blob of blue tack he’d named Blobbert. “It’s that I can’t do their maths. They want it in their order, with their rounding, under their time limit.”