parent
931ee0ca82
commit
88814bbe98
1 changed files with 2 additions and 2 deletions
|
|
@ -9,9 +9,9 @@ proc term(k: float): float = 4 * math.pow(-1, k) / (2*k + 1)
|
||||||
|
|
||||||
proc piU(n: int): float =
|
proc piU(n: int): float =
|
||||||
var ch = newSeq[FlowVar[float]](n+1)
|
var ch = newSeq[FlowVar[float]](n+1)
|
||||||
for k in 0..n:
|
for k in 0..ch.high:
|
||||||
ch[k] = spawn term(float(k))
|
ch[k] = spawn term(float(k))
|
||||||
for k in 0..n:
|
for k in 0..ch.high:
|
||||||
result += ^ch[k]
|
result += ^ch[k]
|
||||||
|
|
||||||
proc piS(n: int): float =
|
proc piS(n: int): float =
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue