CoCoA:ContFracToRat

From ApCoCoAWiki
Revision as of 10:02, 24 October 2007 by XMLBot (talk | contribs) (pushing XML rev. 1.46, again)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

ContFracToRat

convert continued fraction to rational

Description

ContFracToRat returns the rational number equal to the continued

fraction whose denominators are given as input. The denominators must

all be integers, only the very first may be non-positive.

Example

  ContFracToRat([1, 2, 2, 2, 2, 2, 2, 2]);
577/408
-------------------------------

Syntax

ContFracToRat(L:LIST of INT):RAT

ContFrac

CFApprox

CFApproximants

   <type>rat</type>