feat: implement symbolicEqual function#2424
Conversation
Note for this to work in a broad variety of contexts, has to also allow identical expressions to cancel regardless of whether subtraction is always defined; but this seems safe in general, that x-x is 0 even if x does not generally have an additive inverse (for example, when working in the positive context). Resolves josdejong#1260.
|
I just tried this out (not this code specifically, but the same technique) and am pleasantly surprised. It's an elegant approach. The weakness seems to be the dependence on But for my current use case (multiplying polynomial factors of a polynomial to see if the original polynomial is yielded) this seems like it will be a great addition. And as |
|
Yes, absolutely, we want |
|
I added them to the tests on that branch, and they seemed to pass OK. Thanks! |
|
Thanks Glen, looks good 👍 I'll solve the merge conflict and merge this PR now. |
|
Published in |
Note for this to work in a broad variety of contexts, has to also allow
identical expressions to cancel regardless of whether subtraction is
always defined; but this seems safe in general, that x-x is 0 even if x
does not generally have an additive inverse (for example, when working
in the positive context).
Resolves #1260.