CoCoA:ContFrac

From ApCoCoAWiki

ContFrac

continued fractions denominators

Description

ContFrac returns a list of the continued fraction denominators

for a given rational number.

Example

  ContFrac(1.414213);
[1, 2, 2, 2, 2, 2, 2, 2, 1, 1, 4, 1, 1, 1, 1, 1, 2, 1, 6]
-------------------------------

Syntax

ContFrac(X:RAT):LIST of INT

CFApprox

CFApproximants

ContFracToRat

   <type>rat</type>