summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorPalash Nigam <npalash25@gmail.com>2019-08-26 23:43:41 +0530
committerAndreas Rumpf <rumpf_a@web.de>2019-08-26 20:13:41 +0200
commit88814bbe98fe43ca4f3c168b7d77ebb820838e7a (patch)
tree4ef83a5a2e47c67ba2fd06fbbd66607b6254913d
parent931ee0ca827de982bb39c9b53ad0ea874abe94ba (diff)
downloadNim-88814bbe98fe43ca4f3c168b7d77ebb820838e7a.tar.gz
fixes #11832 (#12049)
-rw-r--r--tests/parallel/tpi.nim4
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 =