- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 572
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
Bug in ContinuedFraction rounding #29957
Comments
Changed keywords from continued fraction, rounding to continued_fraction, rounding |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
comment:6
Is the element constructor of |
comment:7
Moving to 9.4, as 9.3 has been released. |
comment:8
Turns out there are failures for 8 a divisor of the denominator. Some examples:
|
This comment has been minimized.
This comment has been minimized.
comment:11
For |
Rounding with
RNDD
andRNDZ
with 17 bits of precision doesn't work for the continued fraction of1761/1024
:This contradicts a doctest in
src/sage/rings/continued_fraction.py
which claims pretty much that this always works (running a loop on 3000 random values with assertion error; but the values were never really random).Looking at this example in more detail:
On top of that, this test can result in the following errors:
The overflow can be reproduced like this:
The zero division error like this:
In #29979, a doctest was marked
not tested
because of this.CC: @slel @videlec
Component: number theory
Keywords: continued_fraction, rounding
Issue created by migration from https://trac.sagemath.org/ticket/29957
The text was updated successfully, but these errors were encountered: