-->
当前位置:首页 > 题库

PROGRAMMING:Finding the partial sum of power series expansion

Luz5年前 (2021-05-10)题库384
Known function $$e ^ x $$can be expanded to Power Series $$1 + X + x ^ 2 / 2+ x^3 /3! + \ cdots + x^k /k! + \ cdots$$。 Now, given a real number $$x $$, it is required to use the partial sum of this power series to find the approximate value of $$e ^ x $$, and the sum continues until the absolute value of the last term is less than 0.00001.
###Input format:
Input gives a real number in a line $$X / in [0,5] $.
###Output format:
Output the partial sum of power series satisfying the condition in one line, and reserve four decimal places.
###Input example:
```in
one point two
```
###Output example:
```out
three point three two zero one
```






answer:If there is no answer, please comment