yantra/patha/katapayadi.js
the Kaṭapayādi (कटपयादि) number cipher, dependency-free, exact (BigInt).
151 lines · 0 exports
The header, as the file states it
What it loads
nothing
What it exports
SS verses named in the header
none in the registry
The channels it runs in
Every function, what it calls, who calls it
9 top-level functions read from the source; the doc line is the comment above each; calls and callers are resolved across the registry’s modules by name. Line numbers are the file’s at engine 3f94072.
Devanagari text → [{syllable, digit}] in written order. Non-letters are skipped.
IAST text → [{syllable, digit}] in written order. Case-insensitive; a trailing virama-less consonant counts.
Decode a word/phrase. value = अङ्कानां वामतो गतिः (first syllable = units), as BigInt.
Encode a non-negative integer as a canonical word (first syllable = units).
The 72-melakarta rule: the first two consonants of the rāga name, read वामतो गतिः.
Decode one word of Āryabhaṭa's letter-numerals written in IAST (BigInt). Throws on a letter outside the code.