up previous next
ContFracToRat

convert continued fraction to rational
Syntax
          
ContFracToRat(L:LIST of INT):RAT

          

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
-------------------------------


See Also