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
wrong result for bool(a <= b) #31424
Comments
comment:1
it seems the decision is taken according to floating-point arithmetic, but as we know, we cannot decide whether an expression is positive from its evaluation in floating-point arithmetic, due to rounding errors and cancellations:
The proper solution would be to evaluate the expression with either |
comment:2
cf #31665 |
comment:3
Moving to 9.4, as 9.3 has been released. |
Author: Michael Orlitzky |
comment:6
It's already using intervals, but without enough precision, so the answer you get back is "I don't know." The |
Branch: u/mjo/ticket/31424 |
Commit: |
comment:8
I'm not very familiar with this subsystem of Sage, but it strikes me as wrong to return |
comment:9
thank you Michael, your patch seems good to me. However
|
Reviewer: Paul Zimmermann |
comment:11
Replying to @zimmermann6:
The user interface could use some work, but
However the real benefit is in knowing that the answer was undetermined, rather than determined to be false. |
comment:12
Replying to @yyyyx4:
Yes, arguably. This problem comes up frequently, and there has been a lot of discussion about it in the past. If I recall correctly, the argument against an exception is that the python data model defines how |
comment:13
I can't find a statement anywhere that Indeed, throwing exceptions in Silently returning mathematically wrong results is always worse than anything that produces |
comment:14
Replying to @yyyyx4:
We're in agreement. This is the best ticket I was able to dig up with a quick search:
Apparently a further issue is that maxima also does not distinguish between "known to be false" and "unknown," and we use maxima in some cases to obtain an answer. |
Changed branch from u/mjo/ticket/31424 to |
Consider the following with Sage 9.0:
This result is wrong:
Component: basic arithmetic
Author: Michael Orlitzky
Branch/Commit:
fc8801c
Reviewer: Paul Zimmermann
Issue created by migration from https://trac.sagemath.org/ticket/31424
The text was updated successfully, but these errors were encountered: