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

const EPSILON=1.0e-15;
fact,e,n := 1, 2.0, 2;
do{
   e0:=e;
   fact*=n; n+=1;
   e+=1.0/fact;
}while((e - e0).abs() >= EPSILON);
println("e = %.15f".fmt(e));