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

numfmt 0 5
fact = 1
n = 2
e = 2
while abs (e - e0) > 0.0001
  e0 = e
  fact = fact * n
  n += 1
  e += 1 / fact
.
print e