Calculating the value of e
Description (from Rosetta Code)
Calculate the value of e.
(e is also known as Euler's number and Napier's constant).
See details: Calculating the value of e
Option 1. Direct
Option 2. Using series
It can also be calculated as a finite sum of the infinite series
Please note that by default, Fōrmulæ performs exact calculations, so it is necessary to show a decimal representation.
Option 3. Using a program
In the previous example, calculation of factorials repeats a lot of work (multiplications). In order to improve the performance, the program can be written.
The program stops when a specified precision is achieved.