Add tags

Add tags to the following comment

Rにはpiという組み込み変数がありますが、計算であればRらしくモンテカルロで。

1
2
3
pi.montecarlo <- function(n){
  mean(replicate(n, sum(runif(2)^2) < 1)) * 4
}

Add tags

The input will be splited to tags with space.

Index

Feed

Other

Link

Pathtraq

loading...