Skip to content
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

Continued fraction -> RR wrong for rationals -1/2^n with RNDD/RNDU rounding #19466

Closed
jdemeyer opened this issue Oct 24, 2015 · 6 comments
Closed

Comments

@jdemeyer
Copy link

All these should return the same value:

sage: RealField(53, rnd="RNDD")(continued_fraction(-1/2))
-0.500000000000001
sage: RealField(53, rnd="RNDU")(continued_fraction(-1/2))
-0.499999999999999
sage: RealField(53, rnd="RNDN")(continued_fraction(-1/2))
-0.500000000000000

Component: basic arithmetic

Author: Jeroen Demeyer

Branch/Commit: 55bf4e4

Reviewer: Vincent Delecroix

Issue created by migration from https://trac.sagemath.org/ticket/19466

@jdemeyer
Copy link
Author

Branch: u/jdemeyer/ticket/19466

@jdemeyer
Copy link
Author

Commit: 55bf4e4

@jdemeyer
Copy link
Author

New commits:

55bf4e4Fix continued fractions -> RR for negative numbers

@videlec
Copy link
Contributor

videlec commented Oct 24, 2015

Reviewer: Vincent Delecroix

@videlec
Copy link
Contributor

videlec commented Oct 24, 2015

comment:3

Nice: bug fix + simpler code!

@vbraun
Copy link
Member

vbraun commented Oct 25, 2015

Changed branch from u/jdemeyer/ticket/19466 to 55bf4e4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants