Task

Calculate the value of   e.



(e   is also known as   Euler's number   and   Napier's constant.)



See details: Calculating the value of e

$ include "seed7_05.s7i";
  include "float.s7i";
 
const float: EPSILON is 1.0e-15;
 
const proc: main is func
  local
    var integer: fact is 1;
    var float: e is 2.0;
    var float: e0 is 0.0;
    var integer: n is 2;
  begin
    repeat
      e0 := e;
      fact *:= n;
      incr(n);
      e +:= 1.0 / flt(fact);
    until abs(e - e0) < EPSILON;
    writeln("e = " <& e digits 15);
  end func;