I am trying to create an E (mathematical constant) approximation script. But it only gives me 15 decimals places. I then added a Decimal()
which increased the number of decimal places but was still limited to 50 decimal places. Is there any way to print all decimals. (If not, what's the limit?)
Here's my code:
from decimal import *
e=1
x = input("Iterations:")
x=int(x)
while 1==1:
e=1 + e/x
x -= 1
if (x <= 0):
break
print(Decimal(e)) # only prints 50 decimal places