yantra/spanda-lattice.js
प्रमाण: गणित (exact integers and rationals on the lattice) · स्वामी-परम्परा D1/D1a/D1c: N = 30⁸ per nākṣatra turn, the pure turn clock · पाठ SS 1.11–12, 1.34, 1.37 (the units of the turn; R and S)
323 lines · 41 exports
The header, as the file states it
What it loads
nothing
What it exports
RationalQgcdBigIntintegerSqrtSPANDA_GROWTH_ESPANDA_CONTRACTION_INV_ESPANDA_HARMONIC_PRODUCTSPANDAS_PER_TURNN_SPANDASDESIGNSAVANA_DAY_SPANDASNAKSHATRA_SECOND_SPANDASCIVIL_SECOND_SPANDASPARAMANU_SPANDASTATPARA_SPANDASNAKSHATRA_MS_SPANDASNAKSHATRA_US_SPANDASturnSpandasOfDaysdaysOfTurnSpandasSPANDAS_PER_ARCMINSPANDAS_PER_ARCSECSPANDAS_PER_PRANASPANDAS_PER_PALASPANDAS_PER_GHATISPANDAS_PER_DAYSPANDAS_PER_TITHISPANDAS_PER_KARANASPANDAS_PER_NAKSHATRASPANDAS_PER_PADASPANDAS_PER_RASHIYUGA_CIVIL_DAYSYUGA_STAR_TURNSYUGA_SOLAR_YEARSYUGA_LUNAR_MONTHSYUGA_ADHIKA_MASAYUGA_KSHAYA_TITHIKALPA_MAHAYUGASKALPA_SOLAR_YEARSKALPA_CIVIL_DAYSYEARS_BEFORE_KALIintegerBisectionSS verses named in the header
- SS 1.11verseprāṇādiḥ kathito mūrtastruṭyādyo amūrtasaṃjñakaḥ । ṣaḍbhiḥ prāṇairvināḍī syāttatṣaṣṭyā nāḍikā smṛtā ।।
- SS 1.12versenāḍīṣaṣṭyā tu nākṣatraṃ ahorātraṃ prakīrtitam । tattriṃśatā bhavenmāsaḥ sāvano arkodayaistathā ।।
- SS 1.34versebhānāṃ aṣṭākṣivasvadritridvidvyaṣṭaśarendavaḥ । bhodayā bhagaṇaiḥ svaiḥ svairūnāḥ svasvodayā yuge ।।
The channels it runs in
Every function, what it calls, who calls it
7 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.
── Greatest Common Divisor (Euclidean on BigInt) ───────────────────────────
Civil days (since any civil origin) → spandas of the turn, the one door of civil time (D1c). A BigInt, a Rational or a whole number is carried EXACTLY (days·N·R/S, a rational with denominator dividing 394,479,457); a fractional float number of days (a measured or bracketing instant) is put on the turn lattice: the nearest whole spanda (≤ ½ spanda = 66 ns).
Spandas of the turn (BigInt or Rational) → civil days, exact: τ·S/(N·R).
Finds the exact Spanda instant t in [tLow, tHigh] where monotonic fn(t) crosses target. Guarantees convergence to the single exact Spanda (zero rounding error).
Pure integer square root for BigInt by the successive-mean step (the mūla of the texts; Āryabhaṭīya Gaṇita 4 extracts the root digit by digit). Returns floor(sqrt(n)).