Skip to content

Haskell implementations of the Egyptian multiplication algorithm

License

Notifications You must be signed in to change notification settings

frankhjung/haskell-multiply

Repository files navigation

Egyptian Multiplication

The following project is a small exploration of the Egyptian multiplication algorithm. The code was inspired by the From Mathematics to Generic Programming.

A non-recursive version using foldl was originally authored by Rodrigo Girão Serrão after conversations on his blog Egyptian multiplication with Haskell.

Documentation

Haddock API documentation is available on:

Setup

To ensure package dependencies are installed, call:

make setup

Build

To build run GNU Make with:

make

This runs the default targets of check and fast.

Test

make test

Benchmark

The first time you run the benchmarks, ensure doc target is called:

make doc bench

After which you can run just:

make bench

Execute

To run the default multiplication algorithm (multiply4):

stack exec multiply 12 15

About

Haskell implementations of the Egyptian multiplication algorithm

Resources

License

Stars

Watchers

Forks

Packages

No packages published