Add tags

Add tags to the following comment

1万回ループの無限級数(1-1/3+1/5-1/7…)で三桁の精度です。

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# 組み込みPI
PIを表示

# 無限級数
a=1
nで1から10000まで繰り返す
    a=a+(-1^n)*(1/(2*n+1))
a*4を表示

# モンテカルロ法
t=10000
m=10000
a=0
nで0からtまで繰り返す
    もし(HYPOT(mの乱数/m,mの乱数/m))<1ならば
        a=a+1
a*4/tを表示

Add tags

The input will be splited to tags with space.

Index

Feed

Other

Link

Pathtraq

loading...