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

fact: 1
e: 2.0
e0: 0.0
n: 2
lim: 0.0000000000000010
 
while [lim =< abs e-e0][
    e0: e
    fact: fact * n
    n: n + 1
    e: e + 1.0 / fact
]
 
print e