summaryrefslogtreecommitdiff
path: root/bench
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
commit10b4f7d216570e8a745f4758ed195348de50b4d5 (patch)
tree0e3753008b44e6636ee5a3b6a5d4bdb8d08f3093 /bench
parent8e62e63f2e282f1b476d15c609d5f65525bca0cf (diff)
downloadmc-10b4f7d216570e8a745f4758ed195348de50b4d5.tar.gz
Fix the factorial calculation.
Diffstat (limited to 'bench')
-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)