Commit 69222145 authored by paul BEZIAU's avatar paul BEZIAU

exercice 1, proposition 3

parent 37ffbd1d
#+TITLE: À propos du calcul de π
#+TITLE: À propos du calcul de $\pi$
#+AUTHOR: Paul Beziau
#+DATE: 9/12/2021
#+LANGUAGE: fr
# #+PROPERTY: header-args :eval never-export
yes* En demandant à la lib maths
* En demandant à la lib maths
Mon ordinateur m'indique que $\pi$ vaut /approximativement/:
#+begin_src python :exports both :session
......@@ -16,7 +16,7 @@ pi
: 3.141592653589793
* En utilisant la méthode des aiguilles de Buffon
Mais calculé avec la *méthode* des aiguilles de [[https://fr.wikipedia.org/wiki/Aiguille_de_Buffon][Buffon]], on obtiendrait comme *approximation* :
Mais calculé avec la *méthode* [[https://fr.wikipedia.org/wiki/Aiguille_de_Buffon][aiguilles deBuffon]], on obtiendrait comme *approximation* :
#+begin_src python :exports both :session
import numpy as np
......@@ -61,7 +61,7 @@ print(matplot_lib_filename)
#+RESULTS:
[[file:./figure.png]]
Il est alors aisé d'obtenir une approximation (pas terrible) de π en comptant combien de fois,
Il est alors aisé d'obtenir une approximation (pas terrible) de $\pi$ en comptant combien de fois,
en moyenne, $X^2+Y^2$ est inférieur à 1 :
#+begin_src python :exports both :session
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment