The inaccuracy appears to be the result of roundoff error; use bigint; or use Math::BigInt ':constant'; (as suggested by tachyon and bageler) fixes that also.
Also, my algorithm is streaming in Gibbons' sense. It represents the continued fraction as a composition of linear fractional transformations.
In reply to Re: Good to about 45 places; spigot algorithm
by jdalbec
in thread e with continued fractions
by jdalbec
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |