Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Testing equivalance could be more smart, easily #159

Open
davidbludlow opened this issue Feb 4, 2022 · 0 comments
Open

Testing equivalance could be more smart, easily #159

davidbludlow opened this issue Feb 4, 2022 · 0 comments

Comments

@davidbludlow
Copy link

davidbludlow commented Feb 4, 2022

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.)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant