Update toy_document_fr.Rmd

parent aa0ef9e2
......@@ -16,4 +16,11 @@ Mon ordinateur m’indique que π vaut approximativement
pi
```
# En utilisant la méthode des aiguilles de Buffon
Mais calculé avec la **méthode** des [aiguilles de Buffon](https://fr.wikipedia.org/wiki/Aiguille_de_Buffon), on obtiendrait comme approximation :
\ No newline at end of file
Mais calculé avec la **méthode** des [aiguilles de Buffon](https://fr.wikipedia.org/wiki/Aiguille_de_Buffon), on obtiendrait comme approximation :
```{r}
set.seed(42)
N = 100000
x = runif(N)
theta = pi/2*runif(N)
2/(mean(x+sin(theta)>1))
```
\ No newline at end of file
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