Implementing exponentials.
No. 123
The exponential f(x)=ex
Q: |
The exponential f(x)=ex is being defined by a power series: Equation 1. Power series definition of
f(x)=ex
ex=1+x11!+x22!+x33!+...=∑∞i=0xii!
Implement a class method Regarding practical calculations we replace the above infinite series by a limited one. So the number of terms to be considered will become a parameter which shall be configurable. Continue the implementation of the following skeleton: Figure 296. An implementation sketch for the exponential
Compare your results using Do not forget to provide suitable Javadoc comments and check the generated HTML documentation for correctness. Hints:
|
A: |