Last active
January 25, 2021 13:17
-
-
Save shakayami/5c788e720f51a28a81b3961270de9082 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
from decimal import * | |
A,B=1,1 | |
for N in range(10000): | |
A=(N+1)*A+1 | |
B=(N+1)*B | |
delta=int(math.log10(B*N))-10 | |
print(delta) | |
getcontext().prec=delta | |
print(Decimal(A)/Decimal(B)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment