Skip to content

Instantly share code, notes, and snippets.

@shakayami
Last active January 25, 2021 13:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shakayami/5c788e720f51a28a81b3961270de9082 to your computer and use it in GitHub Desktop.
Save shakayami/5c788e720f51a28a81b3961270de9082 to your computer and use it in GitHub Desktop.
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