    Continued Fraction Representation of Common Constants

van=facebook.com/LearningCalculus$

cflength:1$

number(x):=[cf(x),first(x)+1/(second(x)+1/(third(x)+1/(fourth(x))))];

c:1/(sqrt(%pi*%e/2)*erfc(1/sqrt(2)));

d:1.52513527616098120908909053639057871330711636492060333554631394242b0;

cf(1.525135);

float(cfdisrep(cf(%)));

cf([1,1,1,1,1,1]);

cfdisrep(%);

float(%);

cfdisrep(cf(bfloat(c)));

float(%);

number([3,7,15,1]);

cflength;

355/113;

float(%);

cfdisrep(cf([3,7,15,1]));

float(%);

float(%)-float(%pi);

number([1,1,1,1]);

float(%)-float(%phi);

number([2,1,2,1]);

float(%)-float(%e);

fpprintprec:10$

for j: 1 thru 6 do
(
    L:create_list(i,i,1,j),
    CF:cfdisrep(cf(L)),
    print("Answer:",float(CF),"=",CF, "=cf(",L,")")
);

cfdisrep(cf(create_list(i,i,1,20)));
float(%);

1+bessel_i(1,2)/bessel_i(0,2);

float(%);