Opened 4 years ago

Closed 4 years ago

#19466 closed defect (fixed)

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

Reported by: jdemeyer Owned by:
Priority: major Milestone: sage-6.10
Component: basic arithmetic Keywords:
Cc: Merged in:
Authors: Jeroen Demeyer Reviewers: Vincent Delecroix
Report Upstream: N/A Work issues:
Branch: 55bf4e4 (Commits) Commit: 55bf4e470e93cf365bc37b1c1053bc24a8cf7f80
Dependencies: Stopgaps:


All these should return the same value:

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

Change History (4)

comment:1 Changed 4 years ago by jdemeyer

  • Branch set to u/jdemeyer/ticket/19466

comment:2 Changed 4 years ago by jdemeyer

  • Commit set to 55bf4e470e93cf365bc37b1c1053bc24a8cf7f80
  • Status changed from new to needs_review

New commits:

55bf4e4Fix continued fractions -> RR for negative numbers

comment:3 Changed 4 years ago by vdelecroix

  • Reviewers set to Vincent Delecroix
  • Status changed from needs_review to positive_review

Nice: bug fix + simpler code!

comment:4 Changed 4 years ago by vbraun

  • Branch changed from u/jdemeyer/ticket/19466 to 55bf4e470e93cf365bc37b1c1053bc24a8cf7f80
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.