Algebrite icon indicating copy to clipboard operation
Algebrite copied to clipboard

Testing equivalance could be more smart, easily

Open davidbludlow opened this issue 3 years ago • 0 comments

Evaluating test(1/m = d/(m*d), 1, 0) and test(1/m = (m-1)/(m*(m-1)), 1, 0) on http://algebrite.org/sandboxes/latest-stable/sandbox.html you will get image As you can see, Algebrite was smart enough to know how to evaluate the first command, even but it wasn't smart enough to know how to evaluate the second one, even though the second one is the same as the first, assuming you substitute m-1 in for d.

Obviously it would be too much to ask Algebrite to be perfectly smart all the time, but here is a little trick to use the smarts that it already has to solve this problem. See the command test(0 = simplify(1/m - (m-1)/(m*(m-1))), 1, 0). It yields image so it does work for testing equivalence between 1/m and (m-1)/(m*(m-1)).

I propose the the equivalence testing logic is changed to use this different strategy of subtracting the things to see if they simplify to 0, to test for equivalence. (or we can do something else to make it smart enough to be able to handle that equivalence test.)

davidbludlow avatar Feb 04 '22 21:02 davidbludlow