summaryrefslogtreecommitdiff
path: root/fac.hs
diff options
context:
space:
mode:
Diffstat (limited to 'fac.hs')
-rw-r--r--fac.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/fac.hs b/fac.hs
new file mode 100644
index 0000000..dce8a26
--- /dev/null
+++ b/fac.hs
@@ -0,0 +1,6 @@
+facn a b = fac a b 1
+
+fac a 0 c = c
+fac a b c = fac (a*a) (div b 2) (c*(if odd b then a else 1))
+
+--fibn a = fib a 1 1 1 1 0