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

e0 = 0
e = 2
n = 0
fact = 1
while (e - e0) > 10^-15
	e0 = e
	n += 1
	fact *= 2*n*((2*n)+1)
	e += ((2.0*n)+2)/fact
end
 
println "Computed e = " + e
println "Number of iterations = " + n