Skip to content

Approximation de π utilisant la formule de Chudnovsky.

Notifications You must be signed in to change notification settings

Shadaki/Formule-de-Chudnovsky

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

Formule de Chudnovsky

Formule de Chudnovsky

J'utilise la méthode de Héron pour calculer la racine carrée d'un nombre :

from decimal import *
n = int(input())
getcontext().prec = 1000
x = Decimal(1)
for i in range(40):
    x = Decimal((x+n/x)/2)
print(x)

About

Approximation de π utilisant la formule de Chudnovsky.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages