"My computer tells me that $\\pi$ is *approximatively*"
"My computer tells me that $\\pi$ is *approximatively*"
=======
"# À propos du calcul de $\\pi$\n",
"## En demandant à la lib maths\n",
"Mon ordinateur m’indique que $\\pi$ vaut *approximativement*"
>>>>>>> ff5bf62e6a54b420ff906287a58051154df436c2
]
]
},
},
{
{
...
@@ -37,8 +43,13 @@
...
@@ -37,8 +43,13 @@
"cell_type": "markdown",
"cell_type": "markdown",
"metadata": {},
"metadata": {},
"source": [
"source": [
<<<<<<< HEAD
"## Buffon's needle\n",
"## Buffon's needle\n",
"Applying the method of [Buffon's needle](https://en.wikipedia.org/wiki/Buffon%27s_needle_problem), we get the __approximation__\n"
"Applying the method of [Buffon's needle](https://en.wikipedia.org/wiki/Buffon%27s_needle_problem), we get the __approximation__\n"
=======
"## En utilisant la méthode des aiguilles de Buffon\n",
"Mais calculé avec la **méthode** [aiguilles de Buffon](https://fr.wikipedia.org/wiki/Aiguille_de_Buffon), on obtiendrait comme **approximation** :\n"
>>>>>>> ff5bf62e6a54b420ff906287a58051154df436c2
]
]
},
},
{
{
...
@@ -70,8 +81,15 @@
...
@@ -70,8 +81,15 @@
"cell_type": "markdown",
"cell_type": "markdown",
"metadata": {},
"metadata": {},
"source": [
"source": [
<<<<<<< HEAD
"## Using a surface fraction argument\n",
"## Using a surface fraction argument\n",
"A method that is easier to understand and does not make use of the $\\sin$ function is based on the fact that if $X\\sim U(0,1)$ and $Y\\sim U(0,1)$, then $P[X^2+Y^2\\leq 1] = \\pi/4$ (see [\"Monte Carlo method\" on Wikipedia](https://en.wikipedia.org/wiki/Monte_Carlo_method)). The following code uses this approach:\n"
"A method that is easier to understand and does not make use of the $\\sin$ function is based on the fact that if $X\\sim U(0,1)$ and $Y\\sim U(0,1)$, then $P[X^2+Y^2\\leq 1] = \\pi/4$ (see [\"Monte Carlo method\" on Wikipedia](https://en.wikipedia.org/wiki/Monte_Carlo_method)). The following code uses this approach:\n"
=======
"## Avec un argument \"fréquentiel\" de surface\n",
"Sinon, une méthode plus simple à comprendre et ne faisant pas intervenir d’appel à la fonction\n",
"sinus se base sur le fait que si $X \\sim U(0,1)$ et $Y \\sim U(0, 1)$ alors $P[X^2 + Y^2 ≤ 1] = \\pi/4$\n",
"(voir [méthode de Monte Carlo sur Wikipedia](https://fr.wikipedia.org/wiki/M%C3%A9thode_de_Monte-Carlo#D%C3%A9termination_de_la_valeur_de_%CF%80)). Le code suivant illustre ce fait :\n"
>>>>>>> ff5bf62e6a54b420ff906287a58051154df436c2
]
]
},
},
{
{
...
@@ -114,7 +132,12 @@
...
@@ -114,7 +132,12 @@
"cell_type": "markdown",
"cell_type": "markdown",
"metadata": {},
"metadata": {},
"source": [
"source": [
<<<<<<< HEAD
"It is then straightforward to obtain a (not really good) approximation to $\\pi$ by counting how many times, on average, $X^2 + Y^2$ is smaller than 1:"
"It is then straightforward to obtain a (not really good) approximation to $\\pi$ by counting how many times, on average, $X^2 + Y^2$ is smaller than 1:"
=======
"Il est alors aisé d’obtenir une approximation (pas terrible) de $\\pi$ en comptant combien de fois,\n",