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 basic interval arithmetic in PolynomialRing #13760
Comments
This comment has been minimized.
This comment has been minimized.
A patch changing |
This comment has been minimized.
This comment has been minimized.
comment:2
Attachment: trac_13760_interval_polynomial_fix.patch.gz |
Author: gmoroz |
comment:5
Guillaume, a non-regression test is missing (also for #7712). Paul |
Work Issues: add non-regression test |
comment:7
all tests pass on top of 5.4.1, just waiting for a non-regression test. Paul |
add regression tests (to be applied after the fix patch) |
comment:8
Attachment: trac_13760_regression_tests.patch.gz Guillaume, why didn't you add as regression tests the examples in the description of #7712 and this ticket? Paul |
comment:9
all tests pass with the regression tests. Paul |
comment:10
I attached the patch with regression tests with user level examples on #7712 (this choice was quite random). |
comment:12
Attachment: trac_7712_regression_tests_for_13760_fix.patch.gz |
Changed author from gmoroz to Guillaume Moroz |
Reviewer: Paul Zimmermann |
Changed work issues from add non-regression test to none |
comment:13
Please indicate which patch(es) need to be applied. |
This comment has been minimized.
This comment has been minimized.
comment:15
Replying to @jdemeyer:
Done. |
comment:16
One very minor documentation thing, there should be a blankline after any double colon |
comment:17
Replying to @tscrim:
It seems that I cannot attach a new patch for that. Is it because of the positive review status? |
Work Issues: docstrings |
comment:18
Replying to @sagetrac-gmoroz:
Strange...I don't think so, but I'll set this to needs work and try it then. |
Attachment: trac_13760_documentation_fix.patch.gz |
This comment has been minimized.
This comment has been minimized.
comment:20
Replying to @tscrim:
My bad, it appears that my file didn't have permissions to be read. |
This comment has been minimized.
This comment has been minimized.
comment:21
Thanks for fixing this. |
Changed work issues from docstrings to none |
Merged: sage-5.6.beta1 |
Some multiplications in multivariate polynomial rings over RIF or CIF are wrong:
More tests
Code digging
The problem comes from the coercion:
This in turn comes from the creation (in
__init__
of classMPolynomial_polydict
insage.rings.polynomial.multi_polynomial_element
) of a PolyDict object (defined insage.rings.polynomial.polydict
) with the optionremove_zero == True
.To check if x is different from 0, PolyDict uses the test
x != 0
, which actually checks for disjointness in interval field:Possible correction
This bug might be corrected by replacing in PolyDict the tests
x != zero
by one of:cmp(x,zero) != 0
not x.is_zero()
not x == zero
Apply:
CC: @burcin @mwhansen @malb @zimmermann6
Component: basic arithmetic
Keywords: interval, polynomial, multivariate
Author: Guillaume Moroz
Reviewer: Paul Zimmermann
Merged: sage-5.6.beta1
Issue created by migration from https://trac.sagemath.org/ticket/13760
The text was updated successfully, but these errors were encountered: