top of page

e adventure

Calculating e from \sum (1/factorial(n))

8132 terms of gives 2.7182818284590455

4 terms of gives 2.708333333333333

117 terms of gives 2.7182818284590455

12 terms of gives 2.7182818282861687

220 terms of gives 2.7182818284590455

1699 terms of gives 2.7182818284590455

6962 terms of gives 2.7182818284590455

97 terms of gives 2.7182818284590455

4519 terms of gives 2.7182818284590455

1207 terms of gives 2.7182818284590455


import math

N=10000

import random

print('Calculating e from \sum (1/factorial(n)')

for j in range(10):

N=int((10**4)**random.random())

s=1.0

import numpy as np

for i in range(1,N):

s=s+1/math.factorial(i)

print(N-1,'terms of gives ', s)

Recent Posts

See All
How the adventure began

[10/25, 12:54] harish ravishankar: Saw html middle of class x1 instead of right click open text file of saved random page in class 7 [10/25, 12:59] harish ravishankar: That shifted interest to physics

 
 
 

1 Comment


Dr. Harish Ravi
Dr. Harish Ravi
Nov 28, 2021

Amazing thing.


Like
bottom of page