update

parent f5cc4b65
......@@ -7,8 +7,7 @@
"# À propos du calcul de $\\pi$\n",
"\n",
"## En demandant à la lib maths\n",
"\n",
"Mon ordinateur m’indique que $\\pi$ vaut approximative"
"Mon ordinateur m’indique que $\\pi$ vaut *approximative*"
]
},
{
......@@ -26,7 +25,7 @@
],
"source": [
"from math import *\n",
"print(pi)\n"
"print(pi)"
]
},
{
......@@ -34,13 +33,12 @@
"metadata": {},
"source": [
"## En utilisant la méthode des aiguilles de Buffon\n",
"\n",
"Mais calculé avec la **méthode** des [aiguilles de Buffon](https://fr.wikipedia.org/wiki/Aiguille_de_Buffon), on obtiendrait comme **approximation** :\n"
]
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 21,
"metadata": {},
"outputs": [
{
......@@ -49,7 +47,7 @@
"3.128911138923655"
]
},
"execution_count": 12,
"execution_count": 21,
"metadata": {},
"output_type": "execute_result"
}
......@@ -100,7 +98,7 @@
"N = 1000\n",
"x = np.random.uniform(size=N, low=0, high=1)\n",
"y = np.random.uniform(size=N, low=0, high=1)\n",
"1\n",
"\n",
"accept = (x*x+y*y) <= 1\n",
"reject = np.logical_not(accept)\n",
"fig, ax = plt.subplots(1)\n",
......
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