We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 82243cd commit dcebd72Copy full SHA for dcebd72
maths/chudnovsky_algorithm.py
@@ -52,8 +52,7 @@ def pi(precision: int) -> str:
52
6 * k) // (factorial(3 * k) * factorial(k) ** 3)
53
linear_term += 545140134
54
exponential_term *= -262537412640768000
55
- partial_sum += Decimal(multinomial_term *
56
- linear_term) / exponential_term
+ partial_sum += Decimal(multinomial_term * linear_term) / exponential_term
57
return str(constant_term / partial_sum)[:-1]
58
59
0 commit comments