In certain cases I get nothing from the continued_fraction function
   in the latest Sage version:

   ----------------------------------------------------------------------
   | Sage Version 4.5.3, Release Date: 2010-09-04                       |
   | Type notebook() for the GUI, and license() for information.        |
   ----------------------------------------------------------------------
   sage: a=sqrt(2).n()*sqrt(2)
   sage: continued_fraction(a)
   []

   In version 4.5.2 the output was

   [2, 2251799813685248]

the reason is that the 4.5.2 result was wrong, see
http://trac.sagemath.org/sage_trac/ticket/8017.

You get no partial quotient because with the default precision of 53 bits,
it is not possible to *correctly* deduce a single partial quotient, because
a is very close to 2. You have to increase the precision:

sage: continued_fraction(a, bits=100)
[2]
sage: continued_fraction(a, bits=150)
[2, 7314423575030504, 1, 83, 1, 2, 1, 108, 1, 20]

Paul Zimmermann

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to