Algorithms from ancient mathematics, read from dated sources and implemented in Python, starting with ancient Indian mathematics.
Every post follows the same steps:
The code lives in 1 public repo, with a module and tests per algorithm: ancient-algorithms on GitHub.
Solving ax + c = by in whole numbers, from the Sanskrit verses to Python, with the modular inverse RSA needs.
The series 1 - 1/3 + 1/5 - ..., the 3 end corrections that speed it up, and a convergence benchmark against later formulas.
Listing every pattern of long and short syllables, the binary encoding behind it, and the triangle of counts that Halayudha's commentary describes.
A small Python model of rule ordering and conflict resolution, compared with Backus-Naur form.
The cyclic method for x^2 - Ny^2 = 1, implemented, with its step count against continued fractions.
How syllables encode numbers, with an encoder and a decoder.
Base-60 arithmetic, the value 1;24,51,10 on the tablet, and what the evidence shows about how it was computed.
Rebuilding the table of numbers from its columns, and the competing readings of what it was for.
Repeated subtraction as Euclid states it, and its step count against the modern version.
The sieve as the text gives it, then the segmented and wheel versions used today.
The averaging rule worked on the square root of 720, and why it doubles the correct digits each step.
A number leaving 2 with 3, 3 with 5 and 2 with 7, and the recipe that gives 23.
The general method, compared step by step with the kuttaka.
I use analytics to see which pages are useful. Nothing else. You can decline. Privacy