Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
On Sangamagr¯ama M¯adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions V.N. Krishnachandran, Reji C. Joy, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala.
V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
International Conference on Computational Engineering Practices and Techniques MES College of Engineering, Kuttippuram, Kerala. 25 - 26 November 2010
V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
We pay obeisance to the computational genius of the great Kerala mathematicians and astronomers of yesteryears. This paper is a tribute to their unparalleled achievements. V.N. Krishnachandran, Reji C. Joy, Siji K.B.
V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Outline 1 Introduction 2 Kerala School of Astronomy and Mathematics 3 Some terminology 4 Madhava’s value for π 5 Madhava’s series 6 Madhava’s sine table 7 Analysis of Madhava’s computational schemes 8 Comparison with modern algorithms 9 Conclusion 10 Bibliography V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Introduction
Introduction
V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Introduction
Classical period in Indian Mathematics begins with Aryabhata I. V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Introduction Classical period in Indian Mathematics Aryabhata I (476 - 550 CE) : Author of Aryabhatiya. Varahamihira (505 - 587 CE) Brhamagupta (598 - 670 CE) Bhaskara I (c.600 - c.680 CE) Govindasvami (c.800 - c.860 CE) Aryabhata II (c.920 - c.1000 CE) Bhaskara II (1114 - 1185 CE) : Author of Lilavati.
V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Introduction
Classical period in Indian Mathematics ends with Bhaskara II. V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Introduction
Development of mathematics in India did not end with Bhaskara II !
V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Introduction
Mathematics continued to flourish in Kerala unknown to the rest of the world! C.M. Whish, an East India Company official, wrote about this in 1832. But nobody noticed it.
V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Kerala School of Astronomy and Mathematics
Kerala School of Astronomy and Mathematics
V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Kerala School : Geographical area (Kerala)
Map of Kerala V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Kerala School : Geographical area (Trikkandiyur)
Map showing Trikkandiyur and nearby places V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Kerala School : Period
Pre-Madhava period : Begins with Vararuci (4 th century CE) ending with Govinda Bhattathiri (1237 - 1295 CE) Madhava and his disciples (c.1350 - c.1650 CE) Later period (c.1650 - c.1850)
V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Kerala School : Founder Sangamagrama Madhava (c.1350 - c.1425 CE) No personal details about M¯adhava has come to light. Sangamagr¯ama is surmised to be a reference to his place of residence. Some historians have identified Sangamagr¯ama as modern day Irinjalakuda in Thrissur District in Kerala. There are references and tributes to M¯adhava in the works of other authors about whom accurate details are available.
V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Kerala School : Iringatappilli temple
Iringatappilli temple near Irinjalakkuda The granite slabs in the picture were said to have been used by Madhava for temple rituals and astronomical studies. V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Keral School : Prominent members
Paramesvara (c.1380 - c.1460), a pupil of Sangamagrama M¯adhava : Promulgator of Drigganita system of astronomical computations in Kerala. Da.modara, another prominent member of the Kerala school, was Paramesvara’s son and also his pupil. N¯ilakant.ha S¯omay¯aji (1444 - 1544), a pupil of Parameshvara. Author of Tantrasamgraha completed in 1501.
V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Kerala School : Tantrasangraha
Image of the cover page of Tantrasangraha being published by Springer.
V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Kerala School : Other prominent members
Jy¯es.t.had¯eva
(c.1500 - c.1600). Author of Yukt.ibh¯as.a.
V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Kerala School : Yukt.ibh¯as.a
Image of the cover page of Yukt.ibh¯as.a published by Springer.
V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Kerala School : Yukt.ibh¯as.a
Composed in Malayalam. It contains clear statements of the power series expansions of the sine and cosine functions and also their proofs. This treatise proves that the idea of proof is not alien to Indian mathematics.
V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Kerala School : Other members
Citrabh¯anu (c.1550) ´ Sankara V¯ariar (c.1500 - c.1560, author of Kriya-kramakari ) Acyuta Pis.¯arat.i (c.1550 - 1621) Putumana S¯omay¯aji (author of Karan.apadhat.i) ´ Sankara Varman (1774 - 1839, author of Sadratnam¯ala)
V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Kerala School : Pre-Madhava figures
V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Kerala School : Madhava and his disciples
Diagram showing teacher-pupil relationships V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Kerala School: Later figures
V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Some terminology
Some terminology
V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Some terminology: C¯apa, jy¯a, koti-jy¯a, utkrama-jy¯a
Diagram showing c¯apa, jy¯a , etc.
V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Some terminology: C¯apa, jy¯a, koti-jy¯a, utkrama-jy¯a
jy¯a of arc AB = BM = R sin
s R
koti-jy¯a of arc AB = OM = R cos
s R
utkrama-jy¯a (or ´sara of arc AB) = MA = R 1 − cos
s R
V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Some terminology: Katapayadi scheme
The Kat.apay¯adi scheme is a method for representing numbers using letters of the Sanskrit alphabet.
V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Some terminology: Katapayadi scheme
Table: Mapping of digits to letters in katapay¯adi scheme
1
2
3
4
5
6
7
8
9
0
ka
kha
ga
gha
na ˙
ca
cha
ja
jha
n ˜a
t.a pa
t.ha pha
d.a ba
d.ha bha
n.a ma
ta
tha
da
dha
na
-
-
-
-
-
ya
ra
la
va
´sa
s.a
sa
ha
-
-
V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Some terminology: Katapayadi scheme
Consonants have numerals assigned as per Table in previous slide. All stand-alone vowels like a and i are assigned to 0. In case of a conjunct, consonants attached to a non-vowel will be valueless. Numbers are written in increasing place values from left to right. The number 386 which denotes 3 × 100 + 8 × 10 + 6 in modern notations would be written as 683 in pre-modern Indian traditions.
V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Madhava’s value for π
Madhava’s value for π
V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Madhava’s value for π
Madhava derived the following series for the computation of π: Madhava series for π π 1 1 1 = 1 − + − + ··· 4 3 5 7
V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Madhava’s value for π
The series is known as the Gregory series. Its discovery has been attributed to Gottfried Wilhelm Leibniz (1646 - 1716) and James Gregory (1638 1675). The series was known in Kerala more than two centuries before its European discovers were born.
V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Madhava’s value for π
Using this series and several correction terms M¯adhava computed the following value for π: π = 3.1415926535922.
V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Madhava’s series
Madhava’s series
V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Madhava’s series for sine: In Madhava’s own words
Multiply the arc by the square of the arc, and take the result of repeating that (any number of times). Divide (each of the above numerators) by the squares of the successive even numbers increased by that number and multiplied by the square of the radius. Place the arc and the successive results so obtained one below the other, and subtract each from the one above. These together give the j¯iva, as collected together in the verse beginning with “vidv¯an” etc.
V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Biblio
Madhava’s series for sine: Rendering in modern notations The following numerators are formed first: s · s 2,
s · s 2 · s 2,
s · s 2 · s 2 · s 2, ·
These are then divided by quantities specified in the verse. s2 , (22 + 2)r 2 s2 s2 · , s· 2 (2 + 2)r 2 (42 + 4)r 2 s2 s2 s2 · · , s· 2 (2 + 2)r 2 (42 + 4)r 2 (62 + 6)r 2 ··· s·
V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Biblio
Madhava’s series for sine: Rendering in modern notations
Place the arc and the successive results so obtained one below the other, and subtract each from the one above to get the expression for j¯iva.
V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Biblio
Madhava’s series for sine: Rendering in modern notations Madhava’s series for sine function j¯iva
= s h − s·
s2 (22 + 2)r 2 h s2 − s· 2 (2 + 2)r 2 h s2 − s· 2 (2 + 2)r 2 iii − ···
s2 (42 + 4)r 2 s2 s2 · 2 · (4 + 4)r 2 (62 + 6)r 2 ·
V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Madhava’s series for sine: As power series for sine
Let θ be the angle subtended by the arc s at the center of the circle. Then s = r θ and j¯iva = rsinθ. Substituting these in the last expression and simplifying we get sin θ = θ −
θ3 θ5 θ7 + − + 3! 5! 7!
···
which is the infinite power series expansion of the sine function.
V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Biblio
Madhava’s series for sine: Reformulation for computation
M¯adhava considers one quarter of a circle. The length of the quarter-circle is taken as 5400 minutes (say C minutes). He computes the radius R of the circle: R = 2 × 5400/π = 3437.74677078493925 = 34370
4400
48000
V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Biblio
Madhava’s series for sine: Reformulation for computation
The expression for j¯iva is now put in the following form: s5 s3 + − ··· R 2 (22 + 2) R 4 (22 + 2)(42 + 4) s 3 h R π 3 s 2 h R π 5 ii 2 2 =s− − − ··· C 3! C 5!
jiva = s −
V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Biblio
Madhava’s series for sine: Pre-computaion of coefficients
No. 1
Expression R × (π/2)3 /3!
22200 3900 40000
Value
2
R × (π/2)5 /5!
2730 5700 47000
3
R × (π/2)7 /7!
160 0500 41000
4 5
R × (π/2)9 /9! R × (π/2)11 /11!
3300 06000 44000
In kat.apay¯adi system ni-rvi-ddh¯a-ngana-r¯e-ndra-rung sa-rv¯a-rtha´s¯i-la-sthi-ro ka-v¯i-´sani-ca-ya tu-nna-ba-la vi-dv¯an
V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Biblio
Madhava’s series for sine: Reformulation for computation Madhava’s polynomial approximation to sine function: jiva = s − (s/C )3 [(22200 3900 40000 ) − (s/C )2 [(2730 5700 47000 − (s/C )2 [(160 0500 41000 ) − (s/C )2 [(3300 06000 ) − (s/C )2 (44000 )]]]]
V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Madhava’s series for cosine Madhava’s polynomial approximation to cosine function: ´sara = (s/C )2 [(42410 0900 00000 ) − (s/C )2 [(8720 03000 05000 ) − (s/C )2 [(0710 4300 24000 ) − (s/C )2 [(030 09000 37000 ) − (s/C )2 [(0500 12000 ) − (s/C )2 (06000 )]]]]]
V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Madhava’s sine table
Madhava’s sine table
V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Madhava’s sine table
(continued in next slide) V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Madhava’s sine table
V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Analysis of Madhava’s computational schemes
Analysis of Madhava’s computational schemes
V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Analysis: These are algorithms!
Madhava and his followers were developing algorithms for the computation of sine and cosine functions. This algorithmic aspect is evident in the way the series expansions were formulated. It is given as a step by step procedure for computations the function values. In Jy¯es.t.had¯eva’s Yuktibh¯as.a, the author has used the term kriya-krama which translates into procedure or an algorithm.
V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Analysis: Use of polynomial approximation
M¯adhava uses polynomial approximations. For sine function, an 11 th degree polynomial is used. For the cosine function, a 12 th degree polynomial is used. The orders of the polynomials were decided by the requirements of accuracy. The values computed by M¯adhava could also be obtained by other methods. But M¯adhava did seek and get a general method in the form of power series expansions.
V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Analysis: Pre-computation of the coefficients
Madhava pre-computed the coefficients appearing in the polynomial approximations.
V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Analysis: Use of Horner’s scheme
M¯adhava had applied what is now known as the Horner’s scheme for the computation of polynomials. The scheme is now attributed to William George Horner (1786 1837) who was a British mathematician and schoolmaster.
V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Analysis: Horner’s scheme
Given the polynomial p(x) =
n X
ai x i = a0 + a1 x + a2 x 2 + a3 x 3 + · · · + an x n ,
i=0
let it be required to evaluate p(x) at a specific value of x.
V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Analysis: Horner’s scheme To compute p(x), the polynomial is expressed in the form p(x) = a0 + x(a1 + x(a2 + · · · + x(an−1 + an x) · · · )). Then apply the following algorithm for computing p(x): bn = an bn−1 = an−1 + bn x ··· b1 = a1 + b2 x b0 = a0 + b1 x. b0 is the required value of the polynomial. V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Analysis: Use of Horner’s scheme
M¯adhava had actually implemented Horner’s scheme in his algorithms. The method was known to Isaac Newton in 1669, the Chinese mathematician Qin Jiushao in the 13th century, and even earlier to the Persian Muslim mathematicians. M¯adhava’s was the first conscious and deliberate application of the scheme in a computational algorithm with the intention of reducing the complexity of numerical procedures.
V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Analysis: Simultaneous computation of sine and cosine In many modern implementations of routines for the calculations of the sine and cosine functions, there would be one routine for the simultaneous computation of sine and cosine. Whenever sine or cosine is required, the other would also be required. So a common algorithm which returns both values simultaneously would be more time efficient and economical. It would appear that M¯adhava had anticipated such a scenario. This is evidenced by the description of one common procedure for the evaluation of sine and cosine functions in Yuktibh¯as.a.
V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Comparison with modern algorithms
Comparison with modern algorithms
V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Comparison: Programmes in Open64 Compiler
Compare, for example, with the programme included in the Open64 Compiler developed by Computer Architecture and Parallel Systems Laboratory in University of Delaware. These programs are not using the polynomials used by M¯adhava. They are using the minimax polynomial computed using the Remez algorithm to improve the accuracy of computations. V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Comparison: Coefficients for computation of sine
The program segment in the next slide specifies the pre-computed coefficients in the polynomial approximation for the sine function. The values are given in the IEEE:754 floating point format.
V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Comparison: Coefficients for computation of sine 00135 /* coefficients for polynomial approximation of sin on +/- pi/4 */ 00136 00137 static const du S[] = 00138 00139 D(0x3ff00000, 0x00000000), 00140 D(0xbfc55555, 0x55555548), 00141 D(0x3f811111, 0x1110f7d0), 00142 D(0xbf2a01a0, 0x19bfdf03), 00143 D(0x3ec71de3, 0x567d4896), 00144 D(0xbe5ae5e5, 0xa9291691), 00145 D(0x3de5d8fd, 0x1fcf0ec1), 00146 ; V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Comparison: Coefficients for computation of cosine
The program segment in the next slide specifies the pre-computed coefficients in the polynomial approximation for the cosine function. The values are also given in the IEEE:754 floating point format.
V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Comparison: Coefficients for computation of cosine 00148 /* coefficients for polynomial approximation of cos on +/- pi/4 */ 00149 00150 static const du C[] = 00151 00152 D(0x3ff00000, 0x00000000), 00153 D(0xbfdfffff, 0xffffff96), 00154 D(0x3fa55555, 0x5554f0ab), 00155 D(0xbf56c16c, 0x1640aaca), 00156 D(0x3efa019f, 0x81cb6a1d), 00157 D(0xbe927df4, 0x609cb202), 00158 D(0x3e21b8b9, 0x947ab5c8), 00159 ; V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Comparison: Polynomial approximations
The program segment in the next slide describes the computations of the polynomial approximations for the sine and cosine functions simultaneously.
V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Comparison: Polynomial approximations
00329 00330 00331 00332 00333 00334 00335 00336 00337
xsq = x*x; cospoly = (((((C[6].d*xsq + C[5].d)*xsq + C[4].d)*xsq + C[3].d)*xsq + C[2].d)*xsq + C[1].d)*xsq + C[0].d; sinpoly = (((((S[6].d*xsq + S[5].d)*xsq + S[4].d)*xsq + S[3].d)*xsq + S[2].d)*xsq + S[1].d)*(xsq*x) + x;
V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Conclusion
Conclusion
V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Conclusion
It is true that this programme having more than 500 lines of code has made use of several other ideas as well. But the critical components continues to be the following which are essentially the ideas enshrined in M¯adhava’s computational scheme developed more than six centuries ago. Use of an approximating polynomial. Pre-computation of coefficients. Use of Horner’s scheme for the evaluation of polynomials. Simultaneous computation of sine and cosine functions.
V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Bibliography
Bibliography
V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Bibliography 1 G. G. Joseph, A Passage to Infinity: Medieval Indian Mathematics from Kerala and Its Impact. New Delhi: Sage Publications Pvt. Ltd, 2009. 2 C. M. Whish, On the hindu quadrature of the circle and the infinite series of the proportion of the circumference to the diameter exhibited in the four sastras, the tantra sahgraham, yucti bhasha, carana padhati and sadratnamala, Transactions of the Royal Asiatic Society of Great Britain and Ireland (Royal Asiatic Society of Great Britain and Ireland, vol. 3 (3), pp. 509 523, 1834. 3 I. S. B. Murthy, A modern introduction to ancient Indian mathematics. New Delhi: New Age International Publishers, 1992. V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Bibliography 4 V. J. Katz, The mathematics of Egypt, Mesopotemia, China, India and Islam: A source book. Princeton: Princeton University Press, 2007, ch. Chapter 4 : Mathematics in India IV. Kerala School (pp. 480 - 495). 5 K. Plofker, Mathematics in India. Princeton, NJ: Princeton University Press, 2010. 6 Madhava of sangamagramma. [Online]. Available: http://wwwgap. dcs.st-and.ac.uk/ history/Projects/Pearce/Chapters/Ch9 3.html 7 K. V. Sarma and V. S. Narasimhan, Tantrasamgraha, Indian Journal of History of Science, vol. 33 (1), Mar. 1998.
V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Bibliography 8 K. V. Sarma and S. Hariharan, Yuktibhasa of jyesthadeva : a book of rationales in indian mathematics and astronomy - an analytical appraisal, Indian Journal of History of Science, vol. 26 (2), pp. 185 207, 1991. 9 A. V. Raman, The katapayadi formula and the modern hashing technique, Annals of the History of Computing, vol. 19 (4), pp. 4952, 1997. 10 R. Roy, Article The discovery of the series formula for π by Leibniz, Gregory, and Nilakantha in Sherlock Holmes in Babylon and other tales of mathematical history, R. W. Marlow Anderson, Victor Katz, Ed. The Mathematical Association of America, 2004. V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Bibliography 11 C. K. Raju, Cultural foundations of mathematics : The nature of mathematical proof and the transmission of the calculus from India to Europe in the 16th c. CE. Delhi: Centre for Studies in Civilizations, 2007. 12 F. Cajori, A history of mathematics, 5th ed. Chelsea Publishing Series, 1999. 13 Jyes.t. hadeva, Gan. ita-yukti-bhas. a, K. V. Sarma, Ed. New Delhi: Hindustan Book Agency, 2008. 14 osprey/libm/mips/sincos.c. [Online]. Available: http:// www.open64.net/ doc/d6/d08/ sincos 8c-source.html 15 k sin.c. [Online]. Available: http://www.netlib.org/fdlibm/k sin.c 16 k cos.c. [Online]. Available: http://www.netlib.org/fdlibm/k cos.c V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio
Intro
Kerala School
Terminology
π value
Madhava’s series
Sine table
Analysis
Comparison
Conclusion
Thanks
V.N. Krishnachandran,, Reji C. Joy,, Siji K.B. Vidya Academy of Science and Technology, Thrissur - 680501, Kerala. On Sangamagr¯ ama M¯ adhava’s (c.1350 - c.1425) Algorithms for the Computation of Sine and Cosine Functions
Biblio