|
Euler's number
The number e is defined as: E=1+1/FACT(1)+1/FACT(2)+1/FACT(3)+...+1/FACT(N)+...
IMPLEMENTATION
Unit: internal function, external function without procedure statement
Parameter: a positive integer P - number of significant digits of e, default is 9 Returns: the first P significant digits of e
There is an another way to obtain the value of the number e: we can compute the number e only once and save its value into the text of the function. See the technique Beforehand computed constants. The following ECONST function can be used to computing of the first P significant decimal digits of e, for P=1,...,200.
The statement Eulers_number=E(1000) computes the E function in a loop (450 iterations) and consumes
1.28 seconds of processing time.
CONNECTIONS
Exponential function
Factorial Natural logarithms Logarithms with other bases than e Technique: Beforehand computed constants P+n trick by Walter Pachl in Reflexio
|
|
|
|
|
|
![]()