// Use the classic continued fraction for e // // e = [1; 0, 1, 1, 2, 1, 1, ... 2n, 1, 1, ...] // // i.e., for the nth term, use // // 1 if n mod 3 != 1 // (n-1)/3 * 2 if n mod 3 == 1 func recur(n, lim int64) *big.Rat { … } // This example demonstrates how to use big.Rat to compute the // first 15 terms in the sequence of rational convergents for // the constant e (base of natural logarithm). func Example_eConvergents() { … }