Opened 4 years ago

Closed 4 years ago

#20069 closed defect (fixed)

RBF: continued_fraction

Reported by: dkrenn Owned by:
Priority: major Milestone: sage-7.1
Component: numerical Keywords: arb
Cc: Merged in:
Authors: Daniel Krenn Reviewers: Travis Scrimshaw
Report Upstream: N/A Work issues:
Branch: 5c3b41f (Commits) Commit: 5c3b41fb2499a8eebf543290a902f0ca9dc3a065
Dependencies: Stopgaps:

Description

sage: continued_fraction(RBF(e))

raises a RuntimeError: maximum recursion depth exceeded ..., but

sage: continued_fraction(RIF(e))
[2; 1, 2, 1, 1, 4, 1, 1, 6, 1, 1, 8, 1, 1, 10, 1, 1, 12, 2]

Change History (8)

comment:1 Changed 4 years ago by dkrenn

  • Keywords arb added
  • Summary changed from Arb: continued_fraction to RBF: continued_fraction

comment:2 Changed 4 years ago by dkrenn

  • Branch set to u/dkrenn/rbf-continued-frac

comment:3 Changed 4 years ago by dkrenn

  • Authors set to Daniel Krenn
  • Commit set to b3ec6eb3591a59709d10a6b2b306259ab84955c6
  • Status changed from new to needs_review

New commits:

b3ec6ebTrac #20069: fix continued_fraction for real balls (RBF)

comment:4 follow-up: Changed 4 years ago by tscrim

All is_RealIntervalField does is

return isinstance(x, RealIntervalField_class)

So I think a better check would be

if isinstance(x.parent(), (RealIntervalField_class, RealBallField)):

Also, could you make the statement :trac:`20069`:: a little more verbose? Something like

Check that this works for arb elements (:trac:`20069`)::

comment:5 Changed 4 years ago by git

  • Commit changed from b3ec6eb3591a59709d10a6b2b306259ab84955c6 to 5c3b41fb2499a8eebf543290a902f0ca9dc3a065

Branch pushed to git repo; I updated commit sha1. New commits:

5c3b41fTrac #20069: improvments suggested by reviewer

comment:6 in reply to: ↑ 4 Changed 4 years ago by dkrenn

Replying to tscrim:

All is_RealIntervalField does is

return isinstance(x, RealIntervalField_class)

So I think a better check would be

if isinstance(x.parent(), (RealIntervalField_class, RealBallField)):

Changed.

Also, could you make the statement :trac:`20069`:: a little more verbose? Something like

Check that this works for arb elements (:trac:`20069`)::

Changed as well. Thank you for your comments.

comment:7 Changed 4 years ago by tscrim

  • Reviewers set to Travis Scrimshaw
  • Status changed from needs_review to positive_review

Thanks.

comment:8 Changed 4 years ago by vbraun

  • Branch changed from u/dkrenn/rbf-continued-frac to 5c3b41fb2499a8eebf543290a902f0ca9dc3a065
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.