Artifact cdb828ca87c53c094f5c1f1536fdb4a8b03b738251059945e836b19c6469fe7d:
- Executable file
r37/lisp/csl/html/r37_0144.html
— part of check-in
[f2fda60abd]
at
2011-09-02 18:13:33
on branch master
— Some historical releases purely for archival purposes
git-svn-id: https://svn.code.sf.net/p/reduce-algebra/code/trunk/historical@1375 2bfe0521-f11c-4a00-b80e-6202646ff360 (user: arthurcnorman@users.sourceforge.net, size: 1232) [annotate] [blame] [check-ins using] [more...]
<A NAME=CONTINUED_FRACTION> <TITLE>CONTINUED_FRACTION</TITLE></A> <b><a href=r37_idx.html>INDEX</a></b><p><p> <B>CONTINUED_FRACTION</B> _ _ _ _ _ _ _ _ _ _ _ _ <B>operator</B><P> <P> <P> <P> <P> <H3> syntax: </H3> <em>continued_fraction</em>(<num>) or <em>continued_fraction</em>( <num>,<size>) <P> <P> <P> This operator approximates the real number <num> ( <A HREF=r37_0323.html>rational</A> number, <A HREF=r37_0330.html>rounded</A> number) into a continued fraction. The result is a list of two elements: the first one is the rational value of the approximation, the second one is the list of terms of the continued fraction which represents the same value according to the definition <em>t0 +1/(t1 + 1/(t2 + ...))</em>. Precision: the second optional parameter <size> is an upper bound for the absolute value of the result denominator. If omitted, the approximation is performed up to the current system precision. <P> <P> <P> <H3> examples: </H3> <P><PRE><TT> continued_fraction pi; 1146408 {-------,{3,7,15,1,292,1,1,1,2,1}} 364913 continued_fraction(pi,100); 22 {--,{3,7}} 7 </TT></PRE><P>