भारत · ग्रहगणित
स्थान उज्जयिनी 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/patha/parahita-madhyama.js

मध्यम of the Parahita karaṇa: Āryabhaṭa's integer mean motions, the

125 lines · 0 exports

प्रमाण: पाठ Āryabhaṭīya Gītikā 3 (the revolutions), Jyotirmīmāṃsā (the Śakābda rule, Parameśvara's fractions) · गणित
लेख · the header

The header, as the file states it

parahita-madhyama.js — मध्यम of the Parahita karaṇa: Āryabhaṭa's integer mean motions, the प्रमाण: पाठ Āryabhaṭīya Gītikā 3 (the revolutions), Jyotirmīmāṃsā (the Śakābda rule, Parameśvara's fractions) · गणित Śakābda-saṃskāra, and Parameśvara's two fractions. Exact rational arithmetic (BigInt); no float on the path; no imports; nothing from any modern source. Parameters and where each is attested: • 4,320,000 Sun, 57,753,336 Moon revolutions in a yuga, and 1,582,237,500 rotations — Āryabhaṭīya, Gītikāpāda 3: the words khyughṛ, cayagiyiṅśuchlṛ, ṅiśibuṇḷṣkhṛ, decoded by Āryabhaṭa's own letter-numerals (katapayadi.js decodeAryabhata; granthas.test.js). Civil days = rotations − Sun revolutions = 1,577,917,500 [theorem on those two printed numbers]. • 488,219 apogee, 232,226 node (retrograde) — Gītikāpāda 3 as printed in the standard editions, NOT in any local edition. They are certified here only by parahita-madhyama.test.js: the Kali start lies at ¾ of the yuga, so a wrong integer moves the place at Parameśvara's epoch by about a quarter circle (¾ of a revolution), and his stated apogee and node (to the minute) could not be reproduced. • Kali start = ¾ of the yuga elapsed: Sun 0°, Moon 0°, apogee 90° (Karkaṭa 0), node 180° (Tulā 0) [consequence of the integers; checked in the test]. • Śakābda-saṃskāra (Jyotirmīmāṃsā p.11, from the Parahita system via Sundararāja): from the Śaka year subtract 444 (vāgbhāva), multiply by 9 / 65 / 13 (dhana / śata / laya), divide by 85 / 134 / 32 (manda / vailakṣya / rāga): minutes, SUBTRACTED from the Moon, its apogee and its node. Every number is a Kaṭapayādi word of that verse; the test decodes them. • Parameśvara (JM p.35): the Moon's minutes diminished by one fifth, the node's by one twelfth, the apogee's whole. • Mean motions are counted by the CIVIL day (SS 14.19). Time is the engine's one clock, spandas τ of the star-wheel's turn (30⁸ to a turn; owner D1/D1a and the pure turn clock D1c): a civil day is R/S turns of the Sūrya-Siddhānta's wheel (R = 1,582,237,828, S = 1,577,917,828, 1.34/1.37 — the same clock as sphuta.js and kala-dvara.js), so days = τ·S/(N·R) exactly and the wheel here is ℤ / (1,577,917,500 civil days × N·R/S): every mean place is an exact residue and returns to itself after one yuga. The civil day itself is derived from the turns of the star-wheel (kala-dvara.js, SS 1.34/1.39). • A Śakābda rate of r minutes a year is 200·r revolutions a yuga (4,320,000 years × r ÷ 21,600). Parameśvara's rates are 16.94 (Moon), 97.01 (apogee) and 74.48 (node) revolutions a yuga — not whole numbers, so the tradition's own bīja opened the wheel; a whole-number bīja keeps it closed. sakabdaRevPerYuga() gives the exact rational. Planets other than Sun and Moon are not here: their integers are not attested in any local source. Browser: window.ParahitaMadhyama; node: module.exports.
आवश्यक · requires

What it loads

nothing

required by
निर्यात · exports

What it exports

पाठ · the verses it cites

SS verses named in the header

  • SS 14.19verse
    sūtakādiparicchedo dinamāsābdapāstathā । madhyamā grahabhuktistu sāvanenaiva gṛhyate ।।
  • 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

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

mod(x, m)lines 52–52
calls nothing in the registry
floorDiv(a, b)lines 53–53
calls nothing in the registry
called by spandasOfDays
bodyOf(b)lines 54–54
calls nothing in the registry
called by meanArcsec
tq(T)lines 56–56

A time in spandas of the turn: a BigInt (whole spandas) or an exact rational {num, den}.

calls nothing in the registry
gcd(a, b)lines 58–58
calls nothing in the registry
called by spandasOfDays
spandasOfDays(days)lines 61–65exported

Civil days since the Kali epoch → spandas of the turn (the engine's clock): exact {num, den} for a whole number of days; a fractional (float) day count on the turn lattice, the nearest whole spanda.

calls gcd, floorDiv
called by nothing in the registry
meanArcsec(body, spandas)lines 69–76exported

Mean longitude at τ spandas of the turn since the Kali epoch, as an exact rational number of arcseconds in [0, 1,296,000): frac(R·(¾·Y + days)/Y), days = τ·S/(N·R) on the engine's clock.

calls bodyOf, tq, mod
called by parahitaArcsec
sakabdaYears(spandas)lines 78–81exported

Kali years elapsed minus 3179 minus 444: the n of the Śakābda rule, as an exact rational.

calls tq
called by nothing in the registry

Śakābda minutes to SUBTRACT (exact rational); `parameshvara` applies his 1/5 and 1/12. The Sun gets none.

calls nothing in the registry
called by parahitaArcsec

The Śakābda rate of a body as revolutions per yuga (exact rational): 200 × mul / div, times Parameśvara's fraction.

calls nothing in the registry
called by nothing in the registry

The Parahita place after the Śakābda-saṃskāra: exact rational arcseconds in [0, 1,296,000).

called by nothing in the registry
toDegMin({ num, den })lines 105–105exported

Arcseconds (rational) → { degrees, minutes (float, fractional) } for display and for minute-level comparison.

calls nothing in the registry
called by nothing in the registry

Offset, in days, from `ahargana` (a whole Kali day's start) to the nearest MEAN syzygy of the given kind ('new' | 'full'). Exact, then floated.

calls mod
called by nothing in the registry