CoCalc Public Filestmp / 2015-07-13-170433-wtf.sagewsOpen in with one click!
Authors: Harald Schilly, ℏal Snyder, William A. Stein
continued_fraction(0 + 1.5757093933463796477495107632093933464).convergents()
[1, 2, 3/2, 8/5, 11/7, 52/33, 947/601, 999/634, 5942/3771, 6941/4405, 12883/8176, 9439896513159544219078716880788553/5990886741565818018721383933658869]
continued_fraction_list(1.575709393346379)
Error in lines 1-1 Traceback (most recent call last): File "/projects/4a5f0542-5873-4eed-a85c-a18c706e8bcd/.sagemathcloud/sage_server.py", line 879, in execute exec compile(block+'\n', '', 'single') in namespace, locals File "", line 1, in <module> File "/projects/sage/sage-6.7/local/lib/python2.7/site-packages/sage/rings/continued_fraction.py", line 2085, in continued_fraction_list raise ValueError("does not know how to compute the continued fraction of %s"%x) ValueError: does not know how to compute the continued fraction of 1.57570939334638
a = 1.5757093933463796477495107632093933464
continued_fraction(RealField(200)(e))
[2; 1, 2, 1, 1, 4, 1, 1, 6, 1, 1, 8, 1, 1, 10, 1, 1, 12, 1, 1, 14, 1, 1, 16, 1, 1, 18, 1, 1, 20, 1, 1, 22, 1, 1, 24, 1, 1, 26, 1, 1, 28, 1, 1, 30, 1, 1, 32, 1, 1, 34, 1, 1, 36, 1, 1, 38, 2]
a = 1.5757093933463796477495107632093933464
type(a)
<type 'sage.rings.real_mpfr.RealLiteral'>
parent(a)
Real Field with 127 bits of precision
continued_fraction_list(0 + 1.575709393346379)
[1, 1, 1, 2, 1, 4, 18, 1, 5, 2, 22909319]