/usr/share/maxima/5.35.1/demo/cf.dem is in maxima-sage 5.35.1-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | /* ===================================================================== */
/* file: cf.dem */
/* CONTINUED FRACTIONS. THIS IS GOOD STUFF. */
frac1:cf([1,2,3,4]);
frac2:cf([2,3,4,5]);
cfdisrep(frac1);
cf(frac1+frac2);
cfdisrep(%);
cf(467288576/469097433);
cfdisrep(%);
ratsimp(%);
/* cf can make the continued fraction expansion of sqrt(n) to
cflength terms. */
block([cflength:4],cfdisrep(cf(sqrt(3))));
ratsimp(%);
%^2-3;
ratsqrt(n,cflength):=ratsimp(cfdisrep(cf(sqrt(n))))$
ratsqrt(1776,25);
%^2-1776;
/* With the primitives of SQRT and rational operations
continued fraction expansions of many trancendental expressions
may be made in the classical way. */
/* ======================== END ==== END ====================== */
|