summaryrefslogtreecommitdiff
path: root/bench/bigfactorial.myr
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2014-09-12 00:52:15 -0400
committerOri Bernstein <ori@eigenstate.org>2014-09-12 00:52:15 -0400
commit74608ff07e71d3c1d98371540d1622254e469a4e (patch)
tree0e3753008b44e6636ee5a3b6a5d4bdb8d08f3093 /bench/bigfactorial.myr
parent77578141ba006cf468bc08ddd80ecc792cfa1e4c (diff)
downloadmc-74608ff07e71d3c1d98371540d1622254e469a4e.tar.gz
Fix the factorial calculation.
Diffstat (limited to 'bench/bigfactorial.myr')
-rw-r--r--bench/bigfactorial.myr2
1 files changed, 1 insertions, 1 deletions
diff --git a/bench/bigfactorial.myr b/bench/bigfactorial.myr
index fdb8fbc..4363774 100644
--- a/bench/bigfactorial.myr
+++ b/bench/bigfactorial.myr
@@ -16,7 +16,7 @@ const bigfact = {n
x = std.mkbigint(1)
else
x = std.mkbigint(n)
- for i = n; i > 0; i--
+ for i = n-1; i > 0; i--
y = std.mkbigint(i)
std.bigmul(x, y)
std.bigfree(y)