|
|
|
|
|
by kisonecat
2849 days ago
|
|
I'm one of the developers of Ximera. Expression equality is handled by https://github.com/kisonecat/math-expressions using a few heuristics, which is necessary because Richardson's theorem says this problem is undecidable. The main trick is to regard the expressions as complex-valued functions, find a point where the value is (nearly) equal, and then check for numerical equality in a neighborhood. (Doing this over the complex plane addresses the problem that many common expressions like sqrt(small number-x^2) have a restricted domain over the reals). We rely on unit tests from Chris Sangwin (who wrote the textbook _Computer Aided Assessment of Mathematics_) to ensure that we're adjudicating expression equality mostly correctly. |
|
I'm going to try to make some stuff myself. I would mostly do it for developmental math, college algebra, and trig. I haven't dug too deep into how to make my own stuff using Ximera but I'm hoping I won't have to write Javascript myself to handle checking expressions.