-
-
Notifications
You must be signed in to change notification settings - Fork 453
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bugs in comparisons between constants, wrapped pyobjects, infinity #12967
Comments
comment:1
ATM, this is caused by #11506:
With #12950, comparison of infinities in Pynac changed. Now I get:
which is better. I hope with the ordering patches in the Pynac queue this will improve. The results of comparison with I suggest adding a patch with doctests reflecting the new behavior with #12950 and closing this ticket when #12950 is merged. |
comment:3
Here's the quick patch with some doctests reflecting the new behavior. |
Author: Travis Scrimshaw |
comment:4
That is what should actually be tested, as Burcin points out. Also, I feel like this is unintuitive enough of behavior (that pi is more or less incomparable with infinity and not like this)
that we should say something to that effect here, maybe even elsewhere in comparison doc where we have other examples saying that I'm also wondering whether this is really "fixed" and deserves that doctest status. |
comment:5
How about this? Can you think of any other places to put the warning about symbolic ring comparisons? Thanks. |
comment:6
There is a typo I am fixing in a review patch. Otherwise I'll give the patch qua patch positive review - I don't think there is more you can do here, this seems fine and passes tests etc. - but wait on a comment from Burcin or someone else as to whether this should count as a fix before pressing the button. I guess I'm just a little uncomfortable with that, though I understand the sentiment and could be easily persuaded by a third party. |
Apply only this patch |
Reviewer: Karl-Dieter Crisman |
This comment has been minimized.
This comment has been minimized.
comment:7
Attachment: trac_12967-symbolic_ring-review.patch.gz Patchbot, apply trac_12967-symbolic_ring-review.patch |
comment:8
I'll let someone else set this to positive review, and I do understand your discomfort. Thank you for the review. |
comment:9
This is absurd. Why should |
comment:55
Replying to @pjbruin:
I strongly agree with that. Making specific examples work with no regard for global consistency usually means introducing bugs, not fixing them.
I tend to agree. Note however that the current definition is more along the lines of
As I repeat on every possible occasion, comparisons in sage are broken in more ways than I can count. One of the fundamental reasons IMHO is that there should be at least two kinds of comparisons (in addition to Clearly we are talking about semantic equality here, but I believe making the previous distinction (at least conceptually) helps separating the issues. Now about your examples: with the current model with a single equality predicate, my answer is **NOOO!!! ** in both cases. With a separate strict equality, it is less clear-cut, but intuitively I would still expect both results to be |
comment:56
Given that it would be more consistent (but less user-friendly) to not mix R with |
comment:57
The symbolic constants, like |
comment:58
So we need another ticket for
|
comment:59
As I have now a better overview, at least some cases could and should be fixed in Pynac. This is pynac/pynac#69 |
Upstream: Reported upstream. Developers acknowledge bug. |
comment:60
Replying to @vbraun:
How would |
Changed branch from u/rws/12967-2 to none |
Changed dependencies from #17984 to pynac-0.3.9.2 |
comment:61
Pynac git master has a fix that does this:
It uses info flags and evalf where applicable. Some function info flags were introduced earlier in Pynac. |
Changed commit from |
This comment has been minimized.
This comment has been minimized.
Changed dependencies from pynac-0.3.9.2 to none |
Changed upstream from Reported upstream. Developers acknowledge bug. to none |
Changed reviewer from Karl-Dieter Crisman to Karl-Dieter Crisman, Daniel Krenn |
We have
which is obviously wrong. It seems that the problem only occurs with
pi
, because the following give correct resultsThis was reported on sage-support by Robert Samal.
See the discussion at https://groups.google.com/forum/?hl=en#!topic/sage-devel/Oip2hzvjFZQ
pynac/pynac#69
Previously proposed patch: attachment: trac_12967-symbolic_ring-review.patch.
CC: @kcrisman
Component: symbolics
Keywords: compare pi infinity bool
Author: Travis Scrimshaw, Ralf Stephan
Reviewer: Karl-Dieter Crisman, Daniel Krenn
Issue created by migration from https://trac.sagemath.org/ticket/12967
The text was updated successfully, but these errors were encountered: