This commit is contained in:
Palash Nigam 2019-08-26 23:43:41 +05:30 • committed by Andreas Rumpf
commit 88814bbe98

View file

@ -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 =