1

I found a simple programming problem that asks how to get Euler's number by iteration. I do not talk about this problem here, but when I researched the definition of Euler's number (well, I think I am already learned them), I found two formulas.

One has the definition of limit, and another is defined by partial sum. So, I raise the question. How can these different formulas transform into each other? Is it even possible?

If it's possible,

How to prove/transform left to right?

$$\lim_{n \to \infty}(1+{1\over{n}})^n = \sum_{n=0}^\infty {1 \over n!} $$

off-topic note

I think I could solve the problem by using partial sum definition. the program like this

double a[2]={1,1}
for(int i=1;i>1;i++){
   a[0]*= 1.0/i
   a[1]+= a[0]
   if (a[0]<pow(0.1,15){break;}
}
printf("e=%f",a[1])
nobiu
  • 11

0 Answers0