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

माधव-गणित: the sine, the arc and π of the Kerala school, for the bīja tier

75 lines · 10 exports

लेख · the header

The header, as the file states it

madhava-ganita.js — माधव-गणित: the sine, the arc and π of the Kerala school, for the bīja tier ज्या (jyā) Mādhava's sine series in Kaṭapayādi (Yuktidīpikā / Kriyākramakarī): Rsin s = s − (s/q)³·[c₁ − (s/q)²·[c₂ − (s/q)²·[c₃ − (s/q)²·[c₄ − (s/q)²·c₅]]]], q = 5400′ c₁ = 2220′39″40‴ nirviddhāṅganarendraruṅ, c₂ = 273′57″47‴ sarvārthaśīlasthiro, c₃ = 16′05″41‴ kavīśanicaya, c₄ = 33″06‴ tunnabala, c₅ = 44‴ vidvān; R = 3437′44″48‴. सारणी the 24 jyās at every 225′ from that series (Mādhava's table, "śreṣṭhaṃ nāma variṣṭhānāṃ …" reproduced to the third). चाप (cāpa) the arc from a jyā (SS 2.33's inverse) by Mādhava's arc series arctan z = z − z³/3 + z⁵/5 − … (Yuktibhāṣā 6), brought within |z| ≤ 2 − √3 by the tri-karaṇī step arctan z = π/6 + arctan((√3·z − 1)/(√3 + z)) — the 1/√3 of the √12 series — so that a handful of terms suffice. π Mādhava's √12 series (Tantrasaṅgraha 2.287 / Kriyākramakarī), √3 the tri-karaṇī of the Śulba (25-digit rational). All in IEEE doubles for speed; every function agrees with the library's own trigonometry to better than 1e-12 of a degree where it should, and with the Kaṭapayādi coefficients' rounding (≈ 1e-7 relative, 0.02″) where Mādhava's numbers set the limit.
आवश्यक · requires

What it loads

required by
निर्यात · exports

What it exports

PISQRT3R_MINjyakojyaarctancapacapaOfJyarsinQuadrantMADHAVA_JYA_TABLE
पाठ · the verses it cites

SS verses named in the header

  • SS 2.33verse
    jyāṃ projjhya śeṣaṃ tattvāśvihataṃ tadvivaroddhṛtam । saṃkhyātattvāśvisaṃvarge saṃyojya dhanurucyate ।।
नलिका · 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.

rsinQuadrant(s)lines 28–31exported

Mādhava's Rsin for an arc s in minutes, 0 ≤ s ≤ 5400 (in minutes, on R = 3437′44″48‴).

calls nothing in the registry
called by jya
arcSeries(z)lines 44–48

Mādhava's arc series on |z| ≤ 2 − √3.

calls nothing in the registry
called by arctan
arctan(z)lines 50–55exported

arctan z in radians: reciprocal for |z| > 1, the tri-karaṇī step for z > tan 15°, then Mādhava's series.

calls arcSeries
called by capa
capa(y, x)lines 57–64exported

cāpa of (y, x): the full-circle arc in degrees [0, 360) of the point (x, y).

capaOfJya(s)lines 66–70exported

cāpa of a unit jyā (arcsine), degrees in [−90, 90]: SS 2.33's inverse.