Research notes · Mathematics & astronomy · 7,847 words
Aryabhata, the Indian mathematical lineage, and Ramanujan: what they can and cannot do for a high-precision astrology engine
Scope note: these are implementation notes for engineers and for whoever writes the "heritage" copy on the site. Every number marked [computed] was calculated in this research session with Python 3.14 plus mpmath at 30 to 120 significant digits, so anyone can re-run it. Primary texts were read from the Internet Archive OCR files:
- Clark 1930 Aryabhatiya: https://archive.org/download/The_Aryabhatiya_of_Aryabhata_Clark_1930/The_Aryabhatiya_of_Aryabhata_Clark_1930_djvu.txt
- Ramanujan Collected Papers 1927: https://archive.org/download/pli.kerala.rare.28155/pli.kerala.rare.28155_djvu.txt
Quotes are kept under 15 words. Everything else is paraphrase.
Q1. Aryabhata (Aryabhatiya, 499 CE): sine table, π, numerals, kuttaka, ahargana. Can integer arithmetic make calendar work exact today?
Takeaway
Aryabhata gives a 24-entry sine-difference table on radius 3438. Its values are within about ±0.7 arcminute-units of the true values, roughly 2 parts in 10,000, so it is heritage only and far too coarse for an ephemeris. His real lasting gift to a modern engine is the structure of the calculation:
- every mean motion is an exact integer ratio (revolutions per yuga ÷ civil days per yuga);
- the elapsed-day count (ahargana) is an integer;
- the kuttaka (an extended-Euclid / CRT solver) inverts that relation exactly.
That structure can be reused directly in two places: an exact "traditional siddhantic panchang" mode, and the integer-day and weekday bookkeeping. It does not remove floating point from a modern true-position (drik) engine.
Cited Findings
Edition and dating
- Clark's translation was published by the University of Chicago Press. Clark was Professor of Sanskrit at Harvard — Clark 1930, title page.
- US works published in 1930 entered the US public domain on 1 January 2026 — Duke CSPD, Public Domain Day 2026; Columbia Libraries blog.
- Aryabhata dates himself in Kalakriya 10: 3 yugapadas plus 3,600 years had elapsed when he was 23. Clark computes 499 CE, assuming a Kaliyuga start in 3102 BCE. Paramesvara (as reported by Clark) took this as the date at which the treatise's planetary calculations would be correct — Clark pp. 54-55.
Alphabetic numerals (Dasagitika, paribhasa stanza)
- Numbers are encoded syllable by syllable. Clark's worked example is the Moon's revolutions per yuga, written chayagiyinusuchhlri. It decodes to 6 + 30 + 300 + 3,000 + 50,000 + 700,000 + 7,000,000 + 50,000,000 = 57,753,336.
- Here the digits run right to left, but the order may change to fit the metre.
- Clark (p. 8) finds it hard to believe the notation was not based on a place-value system — Clark pp. 8-9.
Yuga constants (Dasagitika 1-2)
- Revolutions per yuga:
| Body | Revolutions per yuga |
|---|---|
| Sun | 4,320,000 |
| Moon | 57,753,336 |
| Earth eastward (sidereal days) | 1,582,237,500 |
| Saturn | 146,564 |
| Jupiter | 364,224 |
| Mars | 2,296,824 |
| Moon's apsis | 488,219 |
| Mercury's shighra | 17,937,020 |
| Venus's shighra | 7,022,388 |
| Moon's node (westward) | 232,226 |
- The count starts from the beginning of Mesha, at sunrise on a Wednesday, at Lanka — Clark p. 9.
- Clark notes that the "revolutions of the Earth" are its axial rotations and equal the sidereal days of a yuga. He rejects Paramesvara's attempt to explain the Earth's rotation away — Clark pp. 9-10.
Sine table (Dasagitika 10)
- The 24 sine differences, in minutes of arc, are: 225, 224, 222, 219, 215, 210, 205, 199, 191, 183, 174, 164, 154, 143, 131, 119, 106, 93, 79, 65, 51, 37, 22, 7.
- They are taken at 225′ (3°45′) intervals on a radius of 3,438′. Clark stresses the listed numbers are differences between sines, not the sines themselves — Clark p. 19.
Generating rule for the table (Ganitapada 12)
- Clark's reading: each following sine-difference falls short of the first sine (225) by two things added together: how far the previous difference fell short, and the sum of the preceding sines divided by 225.
- Clark's worked start is 225 → 224 → 222.
- Clark admits that strict use of the rule gives slight divergences. Krishnaswami Ayyangar reconciles them by assuming neglected fractions were redistributed, which the rule does not say — Clark pp. 29-30.
- Clark says the exact method used to build the table is not known (Ganitapada 11 note) — Clark p. 28.
π (Ganitapada 10)
- The rule: add 4 to 100, multiply by 8, add 62,000. The result is the circumference for a diameter of 20,000, so π ≈ 62,832/20,000 = 3.1416.
- Clark records Bhaskara II (Goladhyaya, Bhuvanakosha 52) referring to this rule — Clark p. 28.
- Note: 62832/20000 reduces to 3927/1250. Its error against true π is +7.35 × 10⁻⁶, about 2.3 ppm [computed].
Square and cube roots (Ganitapada 4-5)
- These are digit-by-digit (place-value) algorithms. Odd places are varga and even places avarga. Commentators explain that the root is exact when the last subtraction leaves no remainder — Clark pp. 22-24.
Series (Ganitapada 19-22)
Ganitapada 20 gives the number of terms n of an arithmetic progression from its sum S, first term a and common difference d:
n = ½ [ (√(8dS + (2a − d)²) − 2a) / d + 1 ]
Rodet reads this as evidence that quadratics were understood.
Ganitapada 21 gives the sum of triangular numbers, n(n+1)(n+2)/6, which is the "pile of balls".
Ganitapada 22 gives Σk² = n(n+1)(2n+1)/6 and Σk³ = (Σk)² — Clark pp. 36-37.
Kuttaka (Ganitapada 32-33)
- Following Paramesvara and Brahmagupta, Clark reads it as follows:
- Divide the divisor with the larger remainder by the one with the smaller remainder.
- Reciprocally divide (the Euclidean chain of quotients).
- Multiply the last remainder by an assumed number and add it to the difference of the remainders.
- Fold back up the chain: multiply the penultimate number by the number above it and add the number below it.
- Reduce the result, then combine the two conditions.
- Clark (p. 43) is uncertain whether the rule's enigmatic wording supplies "remainder" or "quotient". He disagrees with Kaye's translation — Clark pp. 42-49.
- Clark's preface notes the close kinship between Aryabhatiya II.32-33 and Brahmagupta XVIII.3-5. It is unresolved which is earlier — Clark p. xiv.
- Paramesvara's worked example (from Clark): find x with 8x = 29y + 4 and 17x = 45z + 7.
- First process: x ≡ 15 (mod 29).
- Second process: x ≡ 11 (mod 45).
- Combined: 34 × 29 = 986, and 986 + 15 = 1001, the smallest x satisfying both — Clark pp. 44-47.
- Reproduced by extended Euclid plus CRT: x₁ = 15, x₂ = 11, x = 1001 (mod 1305) [computed].
- Ganguly's alternative reading, a pure Chinese-remainder problem: Clark's example asks which number leaves remainders 2 and 1 when divided by 3 and 7. The answer is 8 — Clark pp. 48-49.
- Bhaskara I called the method kuttakara. It reduces coefficients step by step and is essentially the Euclidean algorithm — MacTutor, Bhaskara I (MacTutor discusses "the Euclidean algorithm method", though not the term kuttaka).
- A search summary of secondary sources says the method is widely used in astronomy: the coefficient a is a planet's revolutions per yuga, b is the civil days per yuga, and the method effectively yields successive convergents of a/b — via search results including Keller, IJHS 49.2 and Murty, Math History notes. This came from a search-tool summary; I did not read either PDF in full.
- The same search summary (drawing on Shukla's edition of the Mahabhaskariya) describes a weekday check:
- divide the ahargana by 7 and match the remainder to the weekday;
- add or subtract one day if the weekday is off by one;
- the reason is that the mean lunar day can differ from the true one — [search summary, sources as above; not read in full].
- A modern computer-science paper treats the "Aryabhata algorithm" (kuttaka) with least absolute remainders — Rao & Yang, arXiv cs/0604012.
Kaliyuga epoch
- A 1911 JRAS article gives the Kaliyuga era as starting at mean sunrise (6 a.m. Lanka/Ujjain) on Friday 18 February 3102 BCE. In Julian Period days counted from sunrise, that day is 588,467 current, or 588,466 elapsed — JRAS 1911 via Cambridge Core.
- The Surya-siddhanta tradition instead uses midnight, 17/18 February 3102 BCE (Julian) — Wikipedia, Kali Yuga.
- JD for 0h UT Greenwich on 18 February −3101 (Julian, astronomical year numbering) is 588465.5 [computed]. Ujjain midnight is about 5 h 03 m earlier, about JD 588465.29.
Exact rational test vectors [computed] (civil days per yuga = 1,582,237,500 − 4,320,000 = 1,577,917,500)
| Quantity (Aryabhata) | Exact rational | Decimal | Modern value |
|---|---|---|---|
| Sidereal year (days) | 1577917500/4320000 = 210389/576 | 365.2586806 | 365.256363 (sidereal) |
| Sun rate (rev/day) | 576/210389 | 0.98560286°/day | — |
| Moon rate (rev/day) | 78898/2155625 | 13.17635489°/day | ≈13.176358 |
| Synodic month (days) | 1577917500/53433336 | 29.53058181 | 29.530588853 |
| Sidereal month (days) | 1577917500/57753336 | 27.32166848 | 27.321661 |
| Mars (rev/day) | 191402/131493125 | 0.52401766°/day | |
| Jupiter (rev/day) | 30352/131493125 | 0.08309727°/day | |
| Saturn (rev/day) | 36641/394479375 | 0.03343840°/day | |
| Moon's apogee (rev/day) | 488219/1577917500 | 0.11138658°/day | |
| Moon's node (rev/day, retro) | 116113/788958750 | 0.05298209°/day |
More test vectors [computed]
- Conjunction at the Kali epoch. 3/4 of each yuga revolution count is an integer for Sun, Moon, Mars, Jupiter, Saturn and the shighras. So all of them are at 0° at the Kaliyuga start. The Moon's apogee comes out at 90° (fraction 0.25) and the node at 180° (fraction 0.5).
- Ahargana test.
- Inputs: Kali sunrise epoch = 588,466 elapsed. Civil date 2000-01-01 → JD at noon 2,451,545.
- Ahargana A = 2,451,545 − 588,466 = 1,863,079.
- Weekday check: A mod 7 = 1. Day 0 is Friday, so day 1 is Saturday, and 1 January 2000 was a Saturday ✓.
- Mean longitudes at A = 1,863,079, using exact fraction arithmetic
(A·rev mod civ)·360/civ:
| Body | Mean longitude | Exact value |
|---|---|---|
| Sun | 255.98980935° | 53857440/210389 ° |
| Moon | 190.08367411° | 81949824/431125 ° |
| Mars | 326.30267° | |
| Jupiter | 16.78279° | |
| Saturn | 18.38493° | |
| Moon apogee | 162.00534° | |
| Moon node | 290.18901° |
- Inverse problem (the classical use of kuttaka).
- The Sun's residue numerator is r = (A × 576) mod 210389 = 149604.
- Solving 576·A ≡ 149604 (mod 210389) with a modular inverse (extended Euclid) gives A ≡ 179967 (mod 210389).
- That matches 1,863,079 mod 210,389 = 179,967 ✓. This is exactly the "find the days from a planet's remainder" problem.
Aryabhata's sine table vs true sines [computed]
- Columns: J = Aryabhata's cumulative sine; 3438·sin = the true value on his nominal radius; R·sin uses the exact radius R = 21600/2π = 3437.7468; "err vs 3438" = J − 3438·sin.
| i | arc (′) | diff | J (Arya) | 3438·sin | R·sin | err vs 3438 | err vs R |
|---|---|---|---|---|---|---|---|
| 1 | 225 | 225 | 225 | 224.856 | 224.839 | +0.144 | +0.161 |
| 2 | 450 | 224 | 449 | 448.749 | 448.716 | +0.251 | +0.284 |
| 3 | 675 | 222 | 671 | 670.721 | 670.671 | +0.280 | +0.329 |
| 4 | 900 | 219 | 890 | 889.820 | 889.754 | +0.180 | +0.246 |
| 5 | 1125 | 215 | 1105 | 1105.109 | 1105.028 | −0.109 | −0.027 |
| 6 | 1350 | 210 | 1315 | 1315.666 | 1315.569 | −0.666 | −0.569 |
| 7 | 1575 | 205 | 1520 | 1520.589 | 1520.477 | −0.589 | −0.477 |
| 8 | 1800 | 199 | 1719 | 1719.000 | 1718.873 | 0.000 | +0.127 |
| 9 | 2025 | 191 | 1910 | 1910.050 | 1909.910 | −0.050 | +0.090 |
| 10 | 2250 | 183 | 2093 | 2092.922 | 2092.768 | +0.078 | +0.232 |
| 11 | 2475 | 174 | 2267 | 2266.831 | 2266.664 | +0.169 | +0.336 |
| 12 | 2700 | 164 | 2431 | 2431.033 | 2430.854 | −0.033 | +0.146 |
| 13 | 2925 | 154 | 2585 | 2584.825 | 2584.635 | +0.175 | +0.365 |
| 14 | 3150 | 143 | 2728 | 2727.549 | 2727.348 | +0.451 | +0.652 |
| 15 | 3375 | 131 | 2859 | 2858.593 | 2858.382 | +0.408 | +0.618 |
| 16 | 3600 | 119 | 2978 | 2977.395 | 2977.176 | +0.605 | +0.824 |
| 17 | 3825 | 106 | 3084 | 3083.449 | 3083.221 | +0.552 | +0.779 |
| 18 | 4050 | 93 | 3177 | 3176.298 | 3176.064 | +0.702 | +0.936 |
| 19 | 4275 | 79 | 3256 | 3255.546 | 3255.306 | +0.454 | +0.694 |
| 20 | 4500 | 65 | 3321 | 3320.853 | 3320.608 | +0.147 | +0.392 |
| 21 | 4725 | 51 | 3372 | 3371.940 | 3371.691 | +0.060 | +0.309 |
| 22 | 4950 | 37 | 3409 | 3408.587 | 3408.336 | +0.413 | +0.664 |
| 23 | 5175 | 22 | 3431 | 3430.639 | 3430.386 | +0.361 | +0.614 |
| 24 | 5400 | 7 | 3438 | 3438.000 | 3437.747 | 0.000 | +0.253 |
- The 24 differences sum to exactly 3438. The maximum |error| against 3438·sin is 0.70 units (at 67.5°), which is 2.0 × 10⁻⁴ of the radius.
- I also applied the Ganitapada 12 recurrence D₍ₙ₊₁₎ = Dₙ − Jₙ/225 with each quotient rounded to an integer. It reproduces the first 6 differences (225, 224, 222, 219, 215, 210), then falls increasingly short: 204 vs 205, …, 0 vs 7.
- With exact fractions instead, the last difference comes out as 0.86 instead of 7. This confirms Clark's "several slight divergences" remark. The published table is closer to accurately computed sines than to the literal rule.
Inferences
How useful each part is today
- Sine table: heritage only. A relative error of 2 × 10⁻⁴ in a sine propagates to arcminute-level errors in an equation-of-centre term. A modern engine uses libm
sin(about 1 ulp, roughly 10⁻¹⁶). The table is a great live demo ("Aryabhata vs your CPU"), not a computational input. - π = 3.1416: heritage only. It is 2.3 ppm off. Never use it in code. It is useful as an educational fact: correct to 4 decimals, about 499 CE.
Exact integer arithmetic: real but limited utility
- Where it genuinely helps:
- A "Siddhantic / traditional panchang" mode that reproduces a named text's numbers (Aryabhatiya, Surya-siddhanta, Grahalaghava). Mean longitudes there are exact rationals, so
Fractionor int128 arithmetic reproduces the text bit-for-bit with zero floating-point drift. The test vectors above can be its unit tests. - Integer day counts (ahargana / JD day number) and the weekday (mod 7).
- Cycle bookkeeping (60-year Jupiter cycle, Metonic-type intercalation rules) through modular arithmetic.
- Inverse queries ("which days since epoch put the mean Sun in residue r?") through modular inverses: the kuttaka is literally
pow(a, -1, m)(Python ≥ 3.8).
- A "Siddhantic / traditional panchang" mode that reproduces a named text's numbers (Aryabhatiya, Surya-siddhanta, Grahalaghava). Mean longitudes there are exact rationals, so
- Where it does NOT help: modern drik (true-position) tithi, nakshatra and lagna.
- Their boundaries are roots of transcendental functions of an ephemeris (Chebyshev or VSOP/ELP series of sines and cosines). Rational arithmetic cannot represent sin and cos results exactly.
- Floating-point "drift" is not the real risk there. A float64 JD near 2.45 × 10⁶ resolves about 5.4 × 10⁻¹⁰ day, about 47 µs (2,451,545 × 2⁻⁵² days, [computed]).
- The practical hygiene is: keep time as (integer day, fractional day), as in two-part Julian dates; never accumulate time by repeated float addition; and solve each boundary independently by root-finding instead of stepping.
- Aryabhata's mean motions are impressively close to modern values (synodic month 29.530582 vs 29.530589 d, a 0.6 s/month difference). They are still mean motions only. True positions need the manda and shighra corrections, which have errors of arcminutes to degrees.
Rough comparison of the 2000-01-01 mean longitudes
- At Lanka mean sunrise, about 00:57 UT (JD ≈ 2451544.54), using Meeus' standard mean elements and Lahiri ayanamsha ≈ 23°51′11″ (my inference; mean-element formulas are taken from Meeus, Astronomical Algorithms, not fetched here):
- Aryabhata's mean Sun is about 0.17° behind the modern sidereal mean Sun.
- Aryabhata's mean Moon is about 1.7° ahead of the modern sidereal mean Moon.
- This is a nice honest demo: about 1,500 years of extrapolation with integer ratios, still within a couple of degrees. It also explains why traditional panchangs disagree with drik ones by hours.
Gaps
- I did not verify which edition or commentary first states the "a = revolutions, b = civil days" astronomical kuttaka set-up with worked numbers. Shukla's Mahabhaskariya (1960) and Bhaskara I's Aryabhatiyabhashya (629 CE) are the primary places; they were not read here.
- Clark does not give the verse on linear interpolation inside sine tables explicitly. The Aryabhatiya has no stated interpolation formula in Clark's index; second-order interpolation comes later, with Brahmagupta (Q2).
- The exact sunrise and longitude convention of Aryabhata's audayika epoch (Lanka meridian ≈ Ujjain 75°46′E) affects test vectors by up to about 0.25 day. Test vectors above therefore use integer ahargana inputs, so they are convention-free.
- Clark's death year (and therefore non-US public-domain status of his translation) was not verified in this session.
Q2. The lineage after Aryabhata: Bhaskara I, Brahmagupta, Madhava (Kerala school), Bhaskara II. Exact formulas, accuracy, and modern relevance
Takeaway
Two pieces of this lineage are real numerical analysis that a modern engine still uses, in modern form:
- Brahmagupta's second-order (Stirling) interpolation is the ancestor of the polynomial interpolation every ephemeris uses.
- Madhava's power series for sine, cosine and arctangent, with remainder corrections, is mathematically the same as what libm and Chebyshev fits rest on.
Bhaskara I's rational sine (about 1.6 × 10⁻³ absolute error) and Bhaskara II's tatkalika gati (instantaneous velocity) are conceptually important. The latter maps directly onto the Newton step used to find tithi and nakshatra end times. Numerically, none of these historical tables or formulas should be used for computation.
Cited Findings
Bhaskara I (c. 600 – c. 680 CE), Mahabhaskariya VII.17-19
- The formula:
- degrees: sin x° ≈ 4x(180 − x) / (40500 − x(180 − x));
- radians: sin x ≈ 16x(π − x) / (5π² − 4x(π − x)).
- Wikipedia states a maximum absolute error of about 0.0016 and a relative error under 1.8%, for 0° ≤ x ≤ 180° — Wikipedia, Bhaskara I's sine approximation formula.
- MacTutor calls it "amazingly accurate", with a maximum error of less than one percent. Its comparison table shows errors up to about 0.00157 — MacTutor, Bhaskara I.
- The discrepancy between "<1%" and "<1.8%" comes from what is being measured:
- Absolute error relative to R = 1 is under 0.17%.
- Relative error as x → 0 tends to 57.296/56.25 − 1 ≈ 1.86% [computed].
- Related forms per Wikipedia: Brahmagupta's version R sin x ≈ Rx(180 − x)/(10125 − ¼x(180 − x)), and a Bhaskara II version in Lilavati — Wikipedia.
- Test vectors [computed]:
| x | Bhaskara I value | Exact sin | Error |
|---|---|---|---|
| 0°, 30°, 90° | exact (0, 0.5, 1) | — | 0 (exact by construction) |
| 15° | 0.2603550 | 0.2588190 | +0.0015360 |
| 45° | 12/17 = 0.7058824 | 0.7071068 | −0.0012244 |
| 60° | 32/37 = 0.8648649 | 0.8660254 | −0.0011605 |
| 75° | 0.9655172 | 0.9659258 | −0.0004086 |
- Maximum |error| = 0.0016318 at x ≈ 11.54° [computed].
Brahmagupta (c. 598 – 668), second-order interpolation
- With t = (a − x_r)/h: f(a) ≈ f_r + t(D_r + D_{r−1})/2 + t²(D_r − D_{r−1})/2. This is Stirling's formula truncated at second differences.
- It appears in the Khandakhadyaka supplement (665 CE) and the earlier Dhyanagrahopadesha. It was used for sine tables at 900′ (15°) intervals.
- Wikipedia's article mislabels its indices (gatakhanda / bhogyakhanda), so implement from the formula, not from the labels — Wikipedia, Brahmagupta's interpolation formula.
- Test vectors, using an exact sine table at 15° nodes scaled to R = 150 [computed]:
| x | True | Brahmagupta | Linear |
|---|---|---|---|
| 20° | 51.30302 | 51.17587 | 50.88190 |
| 37.5° | 91.31421 | 91.17190 | 90.53301 |
| 50° | 114.90667 | 114.81508 | 114.01195 |
- Maximum error over 15°–75°: 0.110% of R for Brahmagupta vs 0.790% of R for linear interpolation, a roughly 7× improvement.
Madhava of Sangamagrama (c. 1340/1350 – c. 1425) and the Kerala school
- The sine, cosine and arctangent series are attributed to Madhava or his followers. They appear in Shankara Variyar's Yukti-dipika (sine/cosine at 2.440–2.443, arctan at 2.206–2.209) and in Jyeshthadeva's Yuktibhasha.
- Nilakantha and Jyeshthadeva attribute them to Madhava "unambiguously", but no surviving work by Madhava states them.
- Madhava's value of π: 3.1415926535922 — Wikipedia, Madhava series.
- Madhava's sine table:
- radius 3437′44″48‴ (about 21600/2π);
- values given to "thirds" (1/60 arcsecond); for example sin 3°45′ = 224′50″22‴ vs the modern 224′50″21.83‴;
- accurate to the stated precision except one rounding at 15°;
- sin 45° from the table ≈ 0.70710681, which is 6 decimal places.
- It survives in Nilakantha's Aryabhatiya-bhashya and Shankara Variyar's commentary — Wikipedia, Madhava's sine table.
- Madhava–Leibniz π/4 series with Madhava's end-corrections, where p = 2n is the even number following the last odd denominator [computed]:
| n terms | No correction | F₁ = 1/(2p) | F₂ = (p/2)/(p² + 1) | F₃ = (p² + 4)/(2(p³ + 5p)) |
|---|---|---|---|---|
| 10 | −0.0998 | +2.5e−4 | −2.4e−6 | +5.2e−8 |
| 50 | −0.0200 | +2.0e−6 | −8.0e−10 | +7.2e−13 |
- The fast series π = √12 · Σ (−1/3)ᵏ/(2k + 1): with 21 terms the error is +5.8 × 10⁻¹². That is consistent with Madhava's 11-decimal π [computed].
Bhaskara II (1114 – 1185), Siddhanta-shiromani (c. 1150)
- In the Grahaganita, Bhaskara distinguishes a planet's rough daily motion (longitude difference over a day) from its tatkalika gati. The latter is the motion it would have in a day if its speed at that instant stayed uniform.
- The method relies on δ(sin) ≈ cos·δθ, the "derivative of sine".
- He notes that the speed is zero at a stationary point. In the Vasanabhashya he stresses this is necessary for the Moon because its anomaly moves fast.
- Key study: M. S. Sriram, "Instantaneous motion (tatkalikagati) and the 'derivative' of the sine function in Bhaskara-II's Siddhantashiromani", Ganita Bharati 36 (2014) — via Springer IJHS article and New World Encyclopedia, Bhaskara II.
- Whether to call this "calculus" is debated; treat the "differential" framing as interpretation (same sources).
- MacTutor gives Bhaskara II's dates (1114–1185) and his work on kuttaka and Pell-type equations, but does not discuss tatkalika gati — MacTutor, Bhaskara II.
Inferences
Direct utility (concept → modern algorithm)
- Brahmagupta interpolation → Chebyshev / Everett / Lagrange interpolation of ephemeris tables. Any engine that tabulates the Moon at, say, 1-hour steps and interpolates is doing a higher-order Brahmagupta. If the site ever caches positions, cubic or higher interpolation (or Chebyshev) is mandatory. Second order on 1-day steps is not enough for the Moon.
- Tatkalika gati → the Newton step. The tithi-end equation f(t) = elongation(t) − 12k = 0 is solved by t ← t − f(t)/f′(t). Here f′ is exactly the instantaneous elongation speed, Bhaskara II's quantity. This is the most honest "our engine literally uses this idea" claim available.
- Madhava series → power-series and minimax approximations inside every
sin()andatan2(), and the Chebyshev series in JPL files. It is fair to say Kerala mathematicians discovered the series a modern computer uses (in improved minimax form). It is not fair to say the engine "uses Madhava's formula". - Bhaskara I formula: heritage only. An error of 1.6 × 10⁻³ in sin is about 5.6′ of arc in an epicycle term of radius 1 rad, far too large. It is a lovely 7th-century demo: one line of arithmetic, under 0.2% error.
Gaps
- I did not retrieve the original Sanskrit or a PD translation of the Yuktibhasha (the Sarma et al. 2008 Springer translation is in copyright) or the Siddhanta-shiromani. Wilkinson and Bapu Deva Shastri's 1861 Goladhyaya translation is likely PD on archive.org but was not checked.
- Brahmagupta's formula for unequal intervals is mentioned but not given in the source read.
- Sriram 2014 itself was not read; findings about tatkalika gati come from search summaries and secondary pages.
Q3. Ramanujan: π series, ellipse perimeter, modular equations and continued fractions. Is any of it actually useful for an ephemeris engine?
Takeaway
Honest answer: Ramanujan's work does not improve the accuracy of planetary positions.
- π: a float64 engine needs only
M_PI. Ramanujan-type series (and their descendant, the Chudnovsky algorithm) matter only for computing π to millions of digits, and for demos. - Ellipse perimeter: his approximations are astonishingly accurate but irrelevant to position-finding. Positions come from Kepler's equation and the ephemeris, not from orbit length.
- Continued fractions: this is the one area with genuine but modest product utility. Continued fractions (which Ramanujan used masterfully, though the theory predates him) give the best rational approximations to calendar ratios. The 19-year Metonic cycle and luni-solar intercalation rules fall out of them, which is great for explaining calendars.
- Modular and elliptic-function work: inspiration and education only.
Cited Findings
Publication and copyright status
- "Modular equations and approximations to π", Quarterly Journal of Mathematics XLV (1914), pp. 350–372, is reprinted as paper 6 in the 1927 Collected Papers (Hardy, Seshu Aiyar & Wilson eds., Cambridge University Press) — Collected Papers 1927, archive.org.
- Being a pre-1931 US publication, the 1927 edition is public domain in the US (inferred from the 1930 PD rule above — Duke CSPD).
- Other copies exist on archive.org:
collectedpaperso0000rama(1927) and the 1962 Chelsea reprintcollectedpapers0000rama. The 1962 reprint may carry new front matter. - Hardy's Ramanujan: Twelve Lectures (1940) is on archive.org as
in.ernet.dli.2015.212059andramanujan-hardy— archive.org search API results. Its US status is not PD by age (1940 + 95 = 2035). See Gaps.
1/π series
- Ramanujan calls his series (44) "extremely rapidly convergent". He notes that the first term alone already gives a good approximation involving 1103 — Collected Papers p. 38, OCR.
- Standard form: 1/π = (2√2/9801) Σₖ (4k)!(1103 + 26390k) / ((k!)⁴ 396⁴ᵏ).
- Convergence [computed]:
| Terms (k = 0..K) | Correct digits of π |
|---|---|
| 1 (k = 0) | 7.1 (π ≈ 3.14159273001…) |
| 2 | 15.2 |
| 3 | 23.2 |
| 4 | 31.3 |
| 5 | 39.3 |
| 6 | 47.3 |
- That is about 8 digits per term.
Chudnovsky (1988)
- 1/π = (√10005/4270934400) Σ (−1)ᵏ (6k)!(545140134k + 13591409) / ((3k)!(k!)³ 640320³ᵏ).
- It is based on Ramanujan's π formulae, an example of a Ramanujan–Sato series. It gives about 14 digits per term (log₁₀(640320³/1728) ≈ 14.18).
- It has been used, with binary splitting in y-cruncher, for π records; Wikipedia cites 314 trillion digits on 18 November 2025 — Wikipedia, Chudnovsky algorithm.
- [computed]: 13.2, 27.5, 41.8, 56.0 digits after 1, 2, 3, 4 terms.
Ellipse perimeter (§16 of the 1914 paper)
- Ramanujan says both approximations "were obtained empirically" — Collected Papers p. 39, OCR. The equations below are reconstructed from OCR; the error terms were confirmed numerically.
- (49) p = π[3(a + b) − √((a + 3b)(3a + b)) + ε], with ε ≈ a·e¹²/1048576 (2²⁰).
- (50) p = π[(a + b) + 3(a − b)²/(10(a + b) + √(a² + 14ab + b²)) + ε], with ε ≈ 3a·e²⁰/68719476736 (2³⁶).
- Here e is the eccentricity and ε is a positive correction inside the bracket, so both formulas underestimate the perimeter.
- [computed] check of the small-e error, with a = 1 and π·ε as predicted:
| e | Error of (49) | π·a·e¹²/2²⁰ | Error of (50) | π·3a·e²⁰/2³⁶ |
|---|---|---|---|---|
| 0.0167 (Earth) | −1.42e−27 | 1.42e−27 | −3.95e−46 | 3.94e−46 |
| 0.0934 (Mars) | −1.35e−18 | 1.32e−18 | −3.65e−31 | 3.50e−31 |
| 0.2056 (Mercury) | −1.92e−14 | 1.71e−14 | −3.06e−24 | 2.50e−24 |
| 0.9 | −3.58e−5 | — (formula is asymptotic) | −1.18e−8 | — |
- Relative error of (50) for comet-like orbits: −2.2 × 10⁻⁷ at e = 0.967 (Halley); −6.3 × 10⁻⁵ at e = 0.999.
- Test vector [computed], a = 10, b = 6:
- exact (4a·E(k²), complete elliptic integral of the 2nd kind) = 51.053997726796257;
- (49) = 51.053972787517;
- (50) = 51.053997725578.
Continued fractions of calendar ratios [computed]
- Inputs: tropical year 365.242190 d; synodic month 29.530588853 d; sidereal year 365.256363 d.
| Ratio | Value | CF terms | Convergents (best rational approximations) |
|---|---|---|---|
| Tropical year / synodic month | 12.36826640 | [12; 2, 1, 2, 1, 1, 17, 3, 632, …] | 12/1, 25/2, 37/3, 99/8 (octaeteris), 136/11, 235/19 (Metonic), 4131/334, 12628/1021 |
| Sidereal year / synodic month | 12.36874635 | [12; 2, 1, 2, 2, 8, 10, …] | 12/1, 25/2, 37/3, 99/8, 235/19, 1979/160, 20025/1619 |
| Tropical year | 365.24219 d | [365; 4, 7, 1, 3, 24, 6, …] | 365/1, 1461/4 (Julian), 10592/29, 12053/33, 46751/128 |
| Synodic month | 29.530588853 d | [29; 1, 1, 7, 1, 2, 17, …] | 29, 30, 59/2 (alternating 29/30-day months), 443/15, 502/17, 1447/49 |
- Metonic residual: 235 synodic months − 19 tropical years = +0.08677 day ≈ 2 h 05 m per cycle.
- Indian luni-solar rule (inference): adhika-masa intercalation averages 7 extra months per 19 years. That is the 235/19 convergent (19 × 12 + 7 = 235).
Inferences
Direct engine utility of Ramanujan: essentially zero for positions.
- An engine needs π to 16 digits (a constant) and ellipse geometry never.
- His approximations would only matter for something like an "orbit length" infographic. Even there,
scipy.special.ellipeor the arithmetic-geometric mean gives the exact value cheaply. - Do not write "powered by Ramanujan's mathematics" for position accuracy; it would be an overclaim.
Legitimate claims
- (a) The algorithm used to compute π to trillions of digits descends from Ramanujan's 1914 series.
- (b) His ellipse formula (50) is so good that for Earth's orbit its relative error is about 10⁻⁴⁶ (computed above).
- (c) Continued fractions explain why calendars use 19-year, 8-year and 4-year cycles.
- Credit: continued fractions as a theory predate Ramanujan (Euler, Lagrange). Ramanujan's distinctive contributions are particular continued-fraction identities, such as the Rogers–Ramanujan continued fraction. Calendar convergents are classical. Present them as "the mathematics Ramanujan loved", not "Ramanujan's method".
Possible small utility: exactness checks for the siddhantic mode
- Convergents of Aryabhata's yuga ratios, such as Moon/Sun revolutions 57753336/4320000, give the exact cycle lengths after which traditional mean positions repeat.
- This is the same mathematics as the kuttaka (both are the Euclidean algorithm). It is a good bridge narrative: "Aryabhata's pulverizer and Ramanujan's continued fractions are the same machine."
Gaps
- The OCR of §16 is garbled. The error-term exponents (e¹², e²⁰) and denominators (2²⁰, 2³⁶) were confirmed numerically rather than read cleanly. A page-image check of p. 39 is advisable before quoting them on the site.
- Not reviewed: Ramanujan's notebooks (Tata 1957 facsimile) and Hardy's Twelve Lectures.
- Copyright of the 1957 facsimile: Ramanujan died in 1920, so his own text is PD. Whether the facsimile edition carries any separate rights is unverified.
- Hardy 1940 is likely still under US copyright until the end of 2035 if it was renewed or restored (unverified). Hardy died in 1947, so it is PD in life+70 countries since 2018 (inference).
- No source was found claiming that any Ramanujan result is used inside JPL, VSOP or ELP ephemerides. I found nothing to suggest it is, and I did not look exhaustively.
Q4. Modern numerical methods an accurate engine actually needs
Takeaway
A minute-accurate astrology engine needs:
- a numerically integrated ephemeris (JPL DE440/441, or the Swiss Ephemeris compression of it), evaluated by Chebyshev series (Clenshaw recurrence);
- a robust Kepler solver only if you use osculating-element or analytical shortcuts (for example asteroids or teaching demos);
- two-part time representation plus float64; double-double or arbitrary precision is needed only for very long-range work or reference test generation;
- bracketed root-finding (Newton with bisection or Brent fallback) for tithi, nakshatra, sankranti, sunrise and lagna boundaries;
- a well-chosen ΔT model. For historical dates ΔT dominates every other error source by orders of magnitude.
Cited Findings
JPL DE440 file layout — JPL header.440
- The file spans JED 2287184.5 (1549-12-21) to 2688976.5 (2650-01-25). Records are 32-day blocks of 1,018 coefficients.
- GROUP 1050 gives, per body: start pointer, coefficients per component, and sub-intervals per 32 days:
| Body | Coefficients per component | Sub-intervals per 32 days | Granule length |
|---|---|---|---|
| Mercury | 14 | 4 | 8 d |
| Venus | 10 | 2 | 16 d |
| Earth–Moon barycentre | 13 | 2 | 16 d |
| Mars | 11 | 1 | 32 d |
| Jupiter | 8 | 1 | 32 d |
| Saturn | 7 | 1 | 32 d |
| Uranus | 6 | 1 | 32 d |
| Neptune | 6 | 1 | 32 d |
| Pluto | 6 | 1 | 32 d |
| Moon (geocentric) | 13 | 8 | 4 d |
| Sun | 11 | 2 | 16 d |
| Nutations | 10 | 4 | 8 d |
| Librations | 10 | 4 | 8 d |
Swiss Ephemeris — Swiss Ephemeris documentation
- It reproduces JPL to about 1 milli-arcsecond.
- It stores differences between JPL and the analytical theory (VSOP87) as Chebyshev polynomials over one anomalistic cycle. Outer planets use 4000-day Chebyshev segments in the mean-orbit plane.
- DE431-based files cover 13000 BCE – 16800 CE.
- Version 2.06 adopted Stephenson, Morrison & Hohenkerk (2016) ΔT for dates before 1948.
- Lunar compressed files can show small discontinuities every 27.55 days.
- The Moshier fallback gives 0.5″ precision vs DE404 for 1369 BCE – 3000 CE.
- The "true node" and "apogee" have specific smoothness caveats.
Swiss Ephemeris on ayanamsha — same doc
- There is "no striking evidence" astronomically for any one ayanamsha.
- Krishnamurti's definition leaves about 50″ uncertainty.
- Lahiri depends on the precession model: about 5.8″ difference with Newcomb, about 23″ with IAU2006.
ΔT polynomials (Espenak & Meeus, from Morrison & Stephenson 2004) — NASA Eclipse Web Site
- y = year + (month − 0.5)/12.
- 2005–2050: ΔT = 62.92 + 0.32217t + 0.005589t², with t = y − 2000.
- 1986–2005: ΔT = 63.86 + 0.3345t − 0.060374t² + 0.0017275t³ + 0.000651814t⁴ + 0.00002373599t⁵.
- Outside −500 … +2150: ΔT = −20 + 32u², with u = (year − 1820)/100.
- The values assume a lunar secular acceleration of −26″/cy². For use with ELP-2000/82 (−25.858″/cy²), add c = −0.000012932 (y − 1955)².
- The 2005–2050 branch is an extrapolation, e.g. 93 s predicted for 2050.
ΔT uncertainty — NASA, Uncertainty in ΔT
- Morrison & Stephenson 2004 give σ ≈ 0.8t² s, with t = (year − 1820)/100, for 1000 BCE – 1200 CE.
- Earlier and later epochs use Huber's (2000) Brownian model.
| Year | σ(ΔT) | Earth-rotation equivalent |
|---|---|---|
| −1000 | 636 s | 2.65° |
| 0 | 265 s | 1.10° |
| +500 | 139 s | 0.58° |
| +1000 | 54 s | 0.22° |
| +1200 | 31 s | 0.13° |
| −3000 | 8978 s | 37.4° |
| +3000 | 1885 s | 7.9° |
- Telescopic era (Stephenson & Houlden 1986, via search summary): σ = 5 s at 1700, 1 s at 1800, 0.1 s at 1900 — NASA eclipse pages via search.
The current reference is Stephenson, Morrison & Hohenkerk, "Measurement of the Earth's rotation: 720 BC to AD 2015", Proc. R. Soc. A 472 (2016), with an Addendum 2020 (Morrison et al., Proc. R. Soc. A 477, 2021) — search summary of NASA/eclipsewise and gov.uk pages. The paper's page returned HTTP 403, so its uncertainty table was not retrieved.
Kepler's equation (E − e sin E = M), Newton test vectors [computed]
- Start value: E₀ = M for e < 0.8, else π. Tolerance 10⁻¹⁵ rad.
| M | e | E | True anomaly ν | Iterations |
|---|---|---|---|---|
| 5° | 0.1 | 5.554589253872° | 6.139761520840° | 4 |
| 10° | 0.0167086 (Earth) | 10.169019449569° | 10.339452149593° | 3 |
| 27° | 0.2056 (Mercury) | 33.502201975144° | 40.688676613892° | 4 |
| 5° | 0.967 (Halley) | 42.258779317865° | 142.941732397472° | 8 |
| 1° | 0.99 | 24.725822240938° | 144.155951570200° | 10 |
- ν = 2·atan2(√(1 + e)·sin(E/2), √(1 − e)·cos(E/2)).
Inferences
Recommended stack
- Use the Swiss Ephemeris (AGPL or commercial licence) or direct DE440/441 Chebyshev evaluation as the position source.
- Evaluate with Clenshaw. Get velocity analytically from the Chebyshev derivative; it is needed for Newton steps (Bhaskara II's tatkalika gati).
- Toy Clenshaw test (my construction): coefficients [1, 0.5, 0.25] at x = 0.3 give 1 + 0.5·0.3 + 0.25·(2·0.09 − 1) = 0.945.
Precision
- float64 is sufficient for positions: DE files are float64, and 1 ulp of a 2π angle is about 10⁻¹⁵ rad, roughly 0.2 µas.
- Keep JD as (jd_int, jd_frac), the SOFA-style two-part date (my recollection of SOFA convention; not fetched).
- Use mpmath or double-double only to generate reference test vectors or for exact siddhantic-mode rationals.
Root-finding for event times
- Pattern:
- Bracket by stepping at a safe interval: the Moon's tithi or nakshatra rate never changes sign, so step a fraction of a day.
- Refine with Newton using analytic speed, which converges in 2–4 iterations to about 1 ms.
- Fall back to Brent or bisection if Newton leaves the bracket. That can happen for planets near stations, where speed → 0; retrograde ingresses can give multiple roots.
- Sunrise: iterate on altitude = −0°50′ (refraction plus semidiameter), or the Hindu-tradition variant (centre vs limb, with or without refraction). That convention must be explicit and user-visible because panchangs differ on it.
- Lagna: solve the ascendant from local sidereal time (needs UT1, nutation and obliquity) analytically. Lagna sign-change times are roots of λ_asc(t) − 30k (sidereal); bracket at 10-minute steps.
ΔT policy
- For births after about 1955, use the IERS observed values (not fetched here) or the 2005–2050 polynomial; error < 1 s.
- For historical charts, use the Stephenson–Morrison–Hohenkerk 2016 spline (as Swiss Ephemeris does). Display the σ band from the NASA table: e.g. ±265 s at year 0, which means a "time of event" uncertainty of ±4.4 minutes regardless of ephemeris quality.
Gaps
- Not fetched: SOFA/ERFA documentation; IERS ΔT / UT1 tables; the JPL DE440 paper (Park et al. 2021) on DE440 vs DE441 accuracy (DE441 covers −13200 to +17191, with less accurate lunar libration).
- I could not retrieve the 2016 Royal Society paper's σ table (HTTP 403). Use NASA's 2004-based σ until it is checked.
- No authoritative source was fetched comparing Newton, Brent and Danby/Markley Kepler solvers. The recommendation is standard numerical practice.
Q5. Accuracy budget: what precision makes tithi, nakshatra and lagna correct to the minute?
Takeaway
To get tithi, nakshatra and yoga boundaries right to ±1 minute you need:
- Moon-minus-Sun elongation accurate to about ±30″;
- Moon longitude accurate to about ±33″;
- the same ayanamsha definition as the reference panchang, since ayanamsha disputes of tens of arcseconds to degrees dwarf ephemeris error.
Any modern ephemeris (JPL DE / Swiss Ephemeris, about 0.001″) is about 10⁴ times better than needed. So for modern dates errors come from conventions (ayanamsha, sunrise definition, time zone or UT1, ΔT), not from mathematics.
Lagna changes about 1° every 4 minutes on average (15′ of arc per minute of time). It is therefore dominated by birth-time uncertainty: a birth time known to ±5 minutes means ±1.25° of ascendant.
Cited Findings
- Ephemeris precision: Swiss Ephemeris agrees with JPL to about 0.001″. Moshier's analytical fallback is about 0.5″ — Swiss Ephemeris docs.
- Ayanamsha ambiguity: about 50″ for Krishnamurti, and 5.8″–23″ for Lahiri depending on precession model — Swiss Ephemeris docs.
- ΔT uncertainty: ±54 s at 1000 CE, ±265 s at 0 CE, ±636 s at −1000 — NASA ΔT uncertainty.
- Rate conversions, using mean rates [computed]:
| Quantity | Mean rate | Arcsec per second of time | Seconds of time per arcsec |
|---|---|---|---|
| Moon longitude (nakshatra) | 13.176358°/day | 0.549″/s | 1.82 s |
| Elongation (tithi, karana) | 12.190711°/day | 0.508″/s | 1.97 s |
| Sun longitude (sankranti) | 0.985647°/day | 0.041″/s | 24.3 s |
| Earth rotation / ascendant (average) | 360°/sidereal day | 15.04″/s | 1° ≈ 239 s ≈ 4 min |
- Mean tithi length = 12°/12.1907 = 0.98436 d. Mean nakshatra length = 13°20′/13.1764 = 1.01191 d [computed].
Inferences
Budget table (target: event time ±1 min)
| Quantity | Allowed error | Typical modern engine | Main real-world risk |
|---|---|---|---|
| Tithi end | elongation ±30″ | ≤0.01″ | ΔT (pre-1900), time-zone / DST data |
| Nakshatra end | Moon λ ±33″ plus ayanamsha ±33″ | ≤0.01″ | ayanamsha choice (Lahiri variants differ by tens of ″ = tens of seconds) |
| Yoga end | (Sun + Moon) ±~35″ | ≤0.01″ | ayanamsha counted twice in yoga |
| Sankranti (solar ingress) | Sun λ ±2.5″ | ≤0.01″ | ayanamsha: 1″ ↔ 24 s |
| Sunrise | ±1 min | geometry exact | refraction and limb convention (≈2–3 min swing), horizon, elevation |
| Lagna | ascendant ±15′ for ±1 min | exact given UT1 | birth-time quality; UT vs UT1 (<0.9 s, negligible) |
Implications
- The Moon's true speed ranges from about 11.8 to 15.4°/day (recalled typical range, not sourced here). So time-per-arcsecond for nakshatra varies by about ±15% around 1.82 s. Use the actual speed (Bhaskara II's tatkalika gati) in Newton steps, not the mean speed.
- Sankranti is the most sensitive event to ayanamsha choice: 1″ is 24 s of time. A 23″ Lahiri model difference shifts an ingress by about 9 minutes. This should be shown to users as a stated convention.
- For historical charts, ΔT σ converts directly into event-time σ: ±4.4 min at 0 CE, ±10.6 min at −1000 CE. It shifts the Moon by about 0.549″/s × σ, i.e. ±2.4′ at 0 CE, which changes nakshatra positions only near boundaries. Display "uncertain to ±N minutes" for any date before about 1600 instead of false precision.
- Lagna sensitivity is non-uniform. Signs of "short ascension" rise faster, especially at high latitudes. Present the user's birth-time uncertainty as an ascendant range, e.g. "±5 min → Lagna between X°–Y°", and flag when the range crosses a sign boundary.
Gaps
- Published min/max lunar daily motion was not fetched. The 11.8–15.4°/day range is recalled, not sourced.
- No source fetched quantifies sunrise-convention differences between drik panchang publishers in minutes. The 2–3 minute figure is an estimate (refraction 34′ + semidiameter 16′ ≈ 50′ of altitude, about 3.3 min near the equator; my arithmetic).
Q6. How to present the heritage maths in the product (honest framing, live demos, copyright notes)
Takeaway
Present a "Mathematics behind the panchang" gallery of runnable demos. Each one pairs a historical algorithm with its modern successor and a plain-English verdict: either "Used in our engine (modern form)" or "Heritage: shown for wonder, not used for calculation".
Copy should be executive-friendly: plain words first, with the depth one click away. It must never claim Ramanujan or Aryabhata make the predictions more accurate. What is true and still impressive: their ideas (interpolation, instantaneous speed, power series, the Euclidean algorithm) are the same ideas modern engines run.
Cited Findings
- Public-domain and source status:
- Clark's 1930 Aryabhatiya is US-PD since 1 January 2026 — Duke CSPD. The scan is at archive.org.
- Ramanujan's 1927 Collected Papers (pre-1931) is US-PD — archive.org.
- Ramanujan's own texts: he died in 1920 (widely known; not separately sourced here).
- Attribution caution for Madhava: no surviving work by Madhava states the series; the attribution rests on later Kerala texts. Some writers use "Madhava–Newton" or "Madhava–Leibniz" — Wikipedia, Madhava series.
- "Calculus" caution for Bhaskara II: the derivative interpretation of tatkalika gati is a modern reading — Springer IJHS article.
- Clark himself flags uncertainties: the table's method is unknown; the kuttaka verse is enigmatic (II.32-33); the rule gives "slight divergences" — Clark pp. 28-30, 43.
Inferences
Demo set, with the test vectors already above
| # | Demo | Inputs → outputs | Verdict |
|---|---|---|---|
| 1 | Aryabhata vs your CPU: sine table | Slider over the 24 rows; show Aryabhata's J, 3438·sin, error bar. Max error 0.70 at 67.5°. Data in Q1. | Heritage |
| 2 | Decode Aryabhata's verse-numbers | Input chayagiyinusuchhlri → 57,753,336. A syllable→value table is needed; it was not extracted here (see Gaps). | Heritage |
| 3 | Kuttaka solver = extended Euclid | 8x ≡ 4 (mod 29), 17x ≡ 7 (mod 45) → 1001; animate the quotient chain 29 = 3·8 + 5, 8 = 1·5 + 3, 5 = 1·3 + 2, 3 = 1·2 + 1. Second demo: Sun residue 149604 → A ≡ 179967 (mod 210389). | Used (modular arithmetic in calendar code) |
| 4 | Ahargana counter | Any date → days since Kali epoch (A = JD_civil_noon − 588466) → weekday (A mod 7, 0 = Friday) → Aryabhata mean Sun / Moon as exact fractions, beside the modern drik value (shows the ~0.2° Sun / ~1.7° Moon gap in 2000). | Used for day counts; mean motions heritage |
| 5 | Bhaskara I's one-line sine | Plot error; zero at 0°, 30°, 90°, 150°, 180°; peak 0.00163 at 11.5°. | Heritage |
| 6 | Brahmagupta interpolation | Show 7× error reduction vs linear (0.79% → 0.11% of R). Tie-in: "our engine interpolates the Moon with Chebyshev polynomials of degree 12 over 4-day windows" (DE440 header). | Used (modern form) |
| 7 | Madhava's π with end-correction | 50 terms: 2 correct digits raw → 12 correct digits with correction F₃. | Inspiration (same series as libm) |
| 8 | Bhaskara II's instantaneous speed | Animate a Newton iteration finding tithi end, labelling f′(t) as tatkalika gati. | Used (concept is literally the Newton derivative) |
| 9 | Ramanujan π | Each term adds about 8 digits (7.1, 15.2, 23.2, 31.3); compare with Chudnovsky's ~14. | Heritage / inspiration; explicitly "not used for planetary positions" |
| 10 | Ramanujan's ellipse | Earth-orbit relative error about 10⁻⁴⁶ (formula 50). Add a note: "planet positions come from Kepler's equation, not orbit length", with a Kepler demo (M = 5°, e = 0.1 → E = 5.554589°). | Heritage |
| 11 | Why 19 years? Continued fractions | Year/month ratio 12.368266 → [12; 2, 1, 2, 1, 1, 17, …] → 235/19 Metonic, 99/8 octaeteris; adhika-masa ≈ 7 per 19 years; residual 2 h 05 m per cycle. | Used (explains calendar cycles) |
Wording rules for the site
- Say "Aryabhata (499 CE) computed…", "attributed to Madhava (14th c.) by later Kerala texts…", and "Bhaskara II described… (modern scholars read this as a derivative)".
- Show accuracy honestly in every demo (error bars).
- Footer per demo: source edition, its PD status, and "translation paraphrased".
- Avoid "ancient Indians knew calculus / relativity" style overclaims.
Executive-first summary line
- "Our times come from NASA-JPL-grade planetary data and modern root-finding, accurate to a few seconds. The mathematical ideas inside that machinery (interpolation, instantaneous speed, power series, the pulverizer) have a 1,500-year Indian lineage, which you can explore here."
Gaps
- Not extracted: the full katapayadi-like Aryabhata syllable table (consonant values plus vowel place multipliers) needed for demo #2. Clark explains it in the Dasagitika paribhasha notes (about pp. 2-8 of the djvu text), but it was not transcribed here.
- Not checked: Indian copyright status (life + 60) of Clark's translation, or of K. S. Shukla's critical editions (1976 INSA Aryabhatiya; 1960 Mahabhaskariya), which are almost certainly still in copyright.
- Not checked: the Tata 1957 facsimile of the Notebooks (TIFR). It is the best primary source for notebook demos, but its availability on archive.org was not confirmed (search returned only Berndt's in-copyright Ramanujan's Notebooks Parts II–III).