The number e

The number e is given by the infinite sum 1 + 1/1! + 1/2! + 1/3! + 1/4! + ... . Here 1! = 1, 2! = (2)(1), 3! = (3)(2)(1), etc. The infinite sum is approximated by partial sums:

S0 = 1

S1 = 1 + 1/1! = 2

S2 = 1 + 1/1! + 1/2! = 2.5

S3 = 1 + 1/1! + 1/2! + 1/3! = 2.66666....

The more terms in the partial sum, the better the approximation. Thus e is the limit of the sequence of numbers S0, S1, S2, S3, ....


To compute the n-th partial sum of the series for e, use the form below. Use it to determine a value of e accurate to 10 decimal places.

     Number of terms:  
         Partial sum:  
                      


The n-th partial sum is computed by the Javascript function sum:

  function sum(n) {

    var s = 1, f = 1;
    for(i=1; i <= n; i++) {
       f *= i;
       s += 1.0/f;
    }
    return s;
  }