भारत · ग्रहगणित
स्थान उज्जयिनी Ujjayinī · change it on a tool⌕ search the कोश ⌘Kप्रहर — · —:—:—ours, from sunriseउज्जयिनी —:—:—UTC + λ/15 h, λ = 75.7682° E (D13)IST Error −26.9 minlocal mean time − IST = 4λ − 330 min (K12)engine 3f94072the site ↗

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

प्रमाण: गणित (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)
लेख · the header

The header, as the file states it

प्रमाण: गणित (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) spanda-lattice.js — The Fundamental Integer & Rational Arithmetic Lattice In Surya-Siddhanta, space and time are not continuous floating-point approximations; they are discrete, harmonic integer partitions of the star-wheel's revolution (bhacakra). 1 Star-Wheel Turn (नाक्षत्र अहोरात्र) = 360° = 21,600' = 1,296,000" On the Spanda Lattice: N = 30⁸ = 656,100,000,000 Spandas (2^8 * 3^8 * 5^8) to the TURN — owner decisions D1/D1a (2026-10-29; the nākṣatra ahorātra of SS 1.11–12; until then 2^7 * 3^8 * 5^9). The Bhāgavata 3.11 ladder is whole on it: paramāṇu 200, aṇu 400, trasareṇu 1,200, truṭi 3,600 … ghaṭikā 10,935,000,000, muhūrta 30⁷; 1" = 506,250. Pure turn clock (D1c, Design A): EVERY time count is in spandas of the turn. A civil (sāvana) day is not a whole number of them: it is N·R/S = 259,526,559,737,700,000,000 / 394,479,457 spandas (R/S = 1,582,237,828 / 1,577,917,828, SS 1.34/1.37; 394,479,457 is prime), so civil days enter only through turnSpandasOfDays, exactly. The nākṣatra second (1/86,400 of the turn) is 7,593,750 spandas; the civil second is 3,003,779,626,593,750 / 394,479,457 ≈ 7,614,540.056 (D1d). 1 Spanda = 1/30⁸ of the turn ≈ 0.1313 microseconds of (sidereal) time 1 Arc-Spanda ≈ 1.975 micro-arcseconds of space Every celestial calculation is represented as an exact rational [numerator, denominator] evaluated with BigInt arithmetic with zero floating-point rounding error.
आवश्यक · requires

What it loads

nothing

required by
निर्यात · exports

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_KALIintegerBisection
पाठ · the verses it cites

SS verses named in the header

  • SS 1.11verse
    prāṇādiḥ kathito mūrtastruṭyādyo amūrtasaṃjñakaḥ । ṣaḍbhiḥ prāṇairvināḍī syāttatṣaṣṭyā nāḍikā smṛtā ।।
  • SS 1.12verse
    nāḍīṣaṣṭyā tu nākṣatraṃ ahorātraṃ prakīrtitam । tattriṃśatā bhavenmāsaḥ sāvano arkodayaistathā ।।
  • SS 1.34verse
    bhānāṃ aṣṭākṣivasvadritridvidvyaṣṭaśarendavaḥ । bhodayā bhagaṇaiḥ svaiḥ svairūnāḥ svasvodayā yuge ।।
नलिका · channels

The channels it runs in

not on a channel
कार्य · the functions

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.

gcdBigInt(a, b)lines 26–35exported

── Greatest Common Divisor (Euclidean on BigInt) ───────────────────────────

Q(n, d = 1n)lines 163–163exported
calls nothing in the registry
called by bhrigu-chakra-samhita.computeBhriguBindu, drk-grahana.tQ, kala-chakra-cosmic.kalpaChronometry, omni-cosmic-orchestrator.formatGraha, parashara-dasha-engine.computeDashaBalanceAtBirth, parashara-dasha-engine.computeMicroDashaAtInstant, parashara-dasha-engine.getSubPeriod, parashara-dasha-engine.computeParasharaSpecialLagnas, parashara-dasha-engine.formatLagna, parashara-dasha-engine.computeParasharaUpagrahas, parashara-dasha-engine.computeAshtottariDasha, parashara-dasha-engine.computeYoginiDasha, parashara-hora-vargas.computeD1, parashara-hora-vargas.computeD150Nadi, purnanka-bandha-tantra.LADDER, purnanka-bandha-tantra.theta, purnanka-bandha-tantra.thetaDays, purnanka-bandha-tantra.lock, purnanka-bandha-tantra.lockN, purnanka-bandha-tantra.closure, purnanka-bandha-tantra.kalpaClosure, purnanka-bandha-tantra.cosR, purnanka-bandha-tantra.pulse, purnanka-bandha-tantra.pythagoreanResidual, purnanka-bandha-tantra.chain, purnanka-bandha-tantra.ringMeet, purnanka-bandha-tantra.sthiti, purnanka-bandha-tantra.snap, purnanka-bandha-tantra.arcOf, purnanka-bandha-tantra.patra, purnanka-bandha-tantra.dayQ, purnanka-bandha-tantra.qOf, purnanka-bandha-tantra.apparentB, purnanka-bandha-tantra.tauOf, purnanka-bandha-tantra.sunrise, purnanka-bandha-tantra.sunAt, purnanka-bandha-tantra.kaliDayFromCivilTime, purnanka-bandha-tantra.civilTimeFromKaliDay, purnanka-bandha-tantra.lokaOf, purnanka-bandha-tantra.returnsPer, purnanka-bandha-tantra.bijaSeed, purnanka-bandha-tantra.fracQ, purnanka-bandha-tantra.lokaTurn, purnanka-bandha-tantra.sin30, purnanka-bandha-tantra.ARC, purnanka-bandha-tantra.spOfArcmin, purnanka-bandha-tantra.sunrise30, purnanka-bandha-tantra.verify, purnanka-cosmic-constants.computePiMadhavaSeriesQ, purnanka-cosmic-constants.computePiMadhavaSqrt12Q, purnanka-cosmic-constants.computePiMachinQ, purnanka-cosmic-constants.arctanQ, purnanka-graha-engine.ssSineRational, purnanka-graha-engine.madhavaSineRational, purnanka-graha-engine.meanLongitudeArcmin, purnanka-graha-engine.mandaphalaArcmin, purnanka-graha-engine.ssArcSineRational, purnanka-graha-engine.sighraphalaArcmin, purnanka-graha-engine.mandaKarnaOf, purnanka-graha-engine.decimalQ, purnanka-graha-engine.pathaBandha, purnanka-panchanga.trueSunLongitudeArcmin, purnanka-panchanga.trueMoonLongitudeArcmin, purnanka-panchanga.arcminQ, turnSpandasOfDays, vedic-siddhanta-engine.ishtakalaToSpandas, vedic-siddhanta-engine.getSamvatsara, vedic-siddhanta-engine.bijaArcmin, vedic-siddhanta-engine.engineTrueSun, vedic-siddhanta-engine.engineTrueMoon, web.dayQ, web.vargasAtDays, web.one
floorDivB(a, b)lines 214–214
calls nothing in the registry
turnSpandasOfDays(days)lines 220–226exported

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).

daysOfTurnSpandas(tau)lines 228–228exported

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).

calls nothing in the registry
called by nothing in the registry
integerSqrt(n)lines 256–268exported

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)).