mirror of
https://github.com/nim-lang/Nim.git
synced 2026-06-09 05:14:20 +00:00
committed by
Andreas Rumpf
parent
931ee0ca82
commit
88814bbe98
@@ -9,9 +9,9 @@ proc term(k: float): float = 4 * math.pow(-1, k) / (2*k + 1)
|
||||
|
||||
proc piU(n: int): float =
|
||||
var ch = newSeq[FlowVar[float]](n+1)
|
||||
for k in 0..n:
|
||||
for k in 0..ch.high:
|
||||
ch[k] = spawn term(float(k))
|
||||
for k in 0..n:
|
||||
for k in 0..ch.high:
|
||||
result += ^ch[k]
|
||||
|
||||
proc piS(n: int): float =
|
||||
|
||||
Reference in New Issue
Block a user