numbas / Numbas

A completely browser-based e-assessment/e-learning system, with an emphasis on mathematics
http://www.numbas.org.uk
Apache License 2.0
202 stars 117 forks source link

Rules like collectnumbers shouldn't produce infinity #789

Closed christianp closed 2 years ago

christianp commented 3 years ago

We have an expression 12^2*e^(12*e^10 + 210) which is simplified to infinity because it's bigger than the maximum number JS numbers can represent. The simplification rules collecting numbers should only be applied if the result is finite.