#8017: incorrect trailing digits for continued fraction
--------------------------------+-------------------------------------------
   Reporter:  robertwb          |       Owner:  AlexGhitza
       Type:  defect            |      Status:  needs_info
   Priority:  major             |   Milestone:  sage-4.3.4
  Component:  basic arithmetic  |    Keywords:            
     Author:                    |    Upstream:  N/A       
   Reviewer:                    |      Merged:            
Work_issues:                    |  
--------------------------------+-------------------------------------------
Changes (by zimmerma):

  * status:  needs_review => needs_info


Comment:

 Robert, this seems to be great work! However a small question: for *exact*
 symbolic input,
 the truncated continued fraction should not depend on the initial
 floating-point
 approximation, and should be a truncation of the (finite or infinite)
 continued fraction:
 {{{
 sage: continued_fraction(22/7,bits=4)
 [3, 4]
 sage: continued_fraction(22/7,bits=5)
 [3, 8]
 }}}
 I guess the above should give instead:
 {{{
 sage: continued_fraction(RealIntervalField(4)(22/7))
 [3]
 sage: continued_fraction(RealIntervalField(5)(22/7))
 [3]
 }}}
 Can the same problem happen with say sqrt(2), or is it only for rationals?

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8017#comment:3>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to