no commit message

parent 3d392e96
......@@ -8,9 +8,26 @@
"source": [
"# On the computation of $\\pi$\n",
"\n",
"\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"## Asking the maths library\n",
"My computer tells me that $\\pi$ is *approximatively*\n",
"\n",
"\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"from math import *\n",
"print(pi)\n",
"\n",
......@@ -22,7 +39,7 @@
"N = 10000\n",
"x = np.random.uniform(size=N, low=0, high=1)\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)"
]
},
{
......
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