diff options
author | Palash Nigam <npalash25@gmail.com> | 2019-08-26 23:43:41 +0530 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2019-08-26 20:13:41 +0200 |
commit | 88814bbe98fe43ca4f3c168b7d77ebb820838e7a (patch) | |
tree | 4ef83a5a2e47c67ba2fd06fbbd66607b6254913d | |
parent | 931ee0ca827de982bb39c9b53ad0ea874abe94ba (diff) | |
download | Nim-88814bbe98fe43ca4f3c168b7d77ebb820838e7a.tar.gz |
fixes #11832 (#12049)
-rw-r--r-- | tests/parallel/tpi.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/parallel/tpi.nim b/tests/parallel/tpi.nim index dcb9b8fc5..1abed6f23 100644 --- a/tests/parallel/tpi.nim +++ b/tests/parallel/tpi.nim @@ -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 = |