On 13/09/2010 17:31, Håkan Granath wrote:
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)
[]
Try doing
continued_fraction(a,bits=100)
This solves the problem for me. I believe the issue is that with the
default precision it doesn't know if the number is less than or greater
than 2, so it can't determine the first quotient. the number 100 was
fairly arbitrary, the default I think is 52.
HTH
Alastair
In version 4.5.2 the output was
[2, 2251799813685248]
Best regards,
Håkan Granath
--
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