A series

Ancient algorithms, implemented.

Algorithms from ancient mathematics, read from dated sources and implemented in Python, starting with ancient Indian mathematics.

Every post follows the same steps:

  • the source text, translated, with a word-by-word gloss where the source has words;
  • a worked example from the source or its oldest commentary;
  • a derivation of why the method works;
  • Python with tests that check the source's own examples;
  • a comparison with the modern method, and what historians still argue about.

The code lives in 1 public repo, with a module and tests per algorithm: ancient-algorithms on GitHub.