Hi everyone,
I have created a template for checking solutions to quadratic equations by factoring. It works perfectly when solutions are terminating decimals or integers, but it is glitchy with non-terminating decimal answers.

Here is the link. The first 3 slides are screenshots of the issues, the 4th slide is where I am seeing the issues, and the 5th slide is an example where there are no issues.

Thank you!
Trevor

No bug here. What’s happened is you’re interpolating a very small number as a string into numericValue. If you print a small number you get something like 4.440892098500626e-16 which the calculator will identify as 4.44... * e - 16. You can avoid this by not using numericValue unless you’re certain that the numbers being interpolated as strings will be nice, round numbers.

Instead of evaluating two functions and then representing the outputs as strings and performing another function, consider wrapping everything into a single function or using simpleFunction instead of numericValue for the final check:

f1 = simpleFunction("\abs\left(${this.cellContent(1,1)}-\left(${this.cellContent(1,3)}\right)\right)")
check1a = f1.evaluateAt(a1) < 0.1
check1b = f1.evaluateAt(a2) < 0.1


Backticks instead of “” will work better as well, but they don’t format really well here.

That makes perfect sense. Thank you so much!!