diff options
| -rw-r--r-- | README.md | 20 |
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 +``` |
