Next: dfp() Up: Mathematical Macros Help File Previous: chebcoefs()   Contents


continfrac(a, b), a and b REAL vectors or matrices with nrows(b) =
  nrows(a) or nrows(b) = nrows(a) + 1

Keywords: continued fractions, special functions
continfrac(a,b), where a and b are REAL vectors with no MISSING
elements, and nrows(a) = nrows(b) = m, evaluates the continued
continued fraction a[1]/(b[1] + a[2]/(b[2] + a[3]/(b[3] + a[4]/... +

continfrac(a,vector(b0, b)) returns b0 + continfrac(a,b), when b0 is a
non MISSING real scalar.

a and b can also be matrices with the same shape.  In that case,
continfrac(a,b) returns hconcat(continfrac(a[,1], b[,1]),...,
continfrac(a[,m], b[,m]).

If either a or b is a vectir and the other has more than 1 column, the
vector is used in each column of the result.

continfrac(a,vconcat(b0',b)) returns b0 + continfact(a,b), where b0 is
is a vector of length ncols(b).

Gary Oehlert 2003-01-15