aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimo Wilken2019-09-27 19:06:58 +0100
committerTimo Wilken2019-09-27 19:06:58 +0100
commit81c1fd6d9addab54a22cee35f5e901cd6ee809c7 (patch)
tree8ec6af2d8fcf91a9c679f5daba2b645d2501f71d
parente701bfa4e79a9a85fc3841423c13538fdaf13128 (diff)
Add readme.HEADmaster
-rw-r--r--README.md20
1 files changed, 20 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..bc3b7b7
--- /dev/null
+++ b/README.md
@@ -0,0 +1,20 @@
+# Finding zeros in digits of powers of two
+
+I wrote the Haskell version first, then the C version for speed.
+
+Both programs take an optional command-line argument, the power of two to start
+from (e.g. `zeros 10` starts from 1024).
+
+## Try it in C
+
+```{sh}
+$ gcc -O2 zeros.c -lgmp -o zeros
+$ ./zeros
+```
+
+## Try it in Haskell
+
+```{sh}
+$ ghc -O2 -dynamic -o zeros.haskell zeros.hs
+$ ./zeros.haskell
+```