Update,test resolution arrondis

parent d079a4e2
...@@ -4,21 +4,21 @@ ...@@ -4,21 +4,21 @@
"cell_type": "markdown", "cell_type": "markdown",
"metadata": {}, "metadata": {},
"source": [ "source": [
"### 1. À propos du calcul de $\\pi$" "# 1. À propos du calcul de $\\pi$"
] ]
}, },
{ {
"cell_type": "markdown", "cell_type": "markdown",
"metadata": {}, "metadata": {},
"source": [ "source": [
"#### 1.1 En demandant à la lib maths\n", "## 1.1 En demandant à la lib maths\n",
"\n", "\n",
"Mon ordinateur m’indique que $\\pi$ vaut approximativemen" "Mon ordinateur m’indique que $\\pi$ vaut approximativemen"
] ]
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 2, "execution_count": 22,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
"cell_type": "markdown", "cell_type": "markdown",
"metadata": {}, "metadata": {},
"source": [ "source": [
"#### 1.2 En utilisant la méthode des aiguilles de Buffon" "## 1.2 En utilisant la méthode des aiguilles de Buffon"
] ]
}, },
{ {
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 6, "execution_count": 23,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
"3.128911138923655" "3.128911138923655"
] ]
}, },
"execution_count": 6, "execution_count": 23,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
...@@ -70,14 +70,14 @@ ...@@ -70,14 +70,14 @@
"N = 10000\n", "N = 10000\n",
"x = np.random.uniform(size=N, low=0, high=1)\n", "x = np.random.uniform(size=N, low=0, high=1)\n",
"theta = np.random.uniform(size=N, low=0, high=pi/2)\n", "theta = np.random.uniform(size=N, low=0, high=pi/2)\n",
"2/(sum((x+np.sin(theta))>1)/N)\n" "2/(sum((x+np.sin(theta))>1)/N)"
] ]
}, },
{ {
"cell_type": "markdown", "cell_type": "markdown",
"metadata": {}, "metadata": {},
"source": [ "source": [
"#### 1.3 Avec un argument \"fréquentiel\" de surface" "## 1.3 Avec un argument \"fréquentiel\" de surface"
] ]
}, },
{ {
...@@ -85,13 +85,13 @@ ...@@ -85,13 +85,13 @@
"metadata": {}, "metadata": {},
"source": [ "source": [
"Sinon, une méthode plus simple à comprendre et ne faisant pas intervenir d’appel à la fonction\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 ∼ U(0, 1)$ et $Y ∼ U(0, 1)$ alors $P[X^2 + Y^2 ≤ 1] = \\pi/4$ (voir\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$ (voir\n",
"[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 :" "[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 :"
] ]
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 8, "execution_count": 24,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
...@@ -133,7 +133,7 @@ ...@@ -133,7 +133,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 9, "execution_count": 25,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
...@@ -142,7 +142,7 @@ ...@@ -142,7 +142,7 @@
"3.112" "3.112"
] ]
}, },
"execution_count": 9, "execution_count": 25,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
......
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