continued_fraction, a FORTRAN90 code which implements some simple algorithms for dealing with simple and generalized continued fractions.
Mathematically, continued fractions are infinite sums. In general, they are treated computationally as finite sums. Here we will assume that all such sums terminate at index N.
A simple continued fraction (SCF) is a representation of a number R as:
R = A0 + 1 / ( A1 + 1 / ( A2 + 1 / ( A3 + ... + 1 / AN )...)))
A generalized continued fraction (GCF) is a representation of a number R as:
R = A0 + B1 / ( A1 + B2 / ( A2 + B3 / ( A3 + ... + BN / AN )...)))
For either form of continued fraction, there are two tasks:
The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.
continued_fraction is available in a C version and a C++ version and a FORTRAN90 version and a MATLAB version and a Python version and.
SUBSET, a FORTRAN90 code which enumerates, generates, randomizes, ranks and unranks combinatorial objects including combinations, compositions, Gray codes, index sets, partitions, permutations, polynomials, subsets, and Young tables. Backtracking routines are included to solve some combinatorial problems. Some routines for continued fractions are included.