There has been a strong association between Sanskrit slokas and mathematics. Several studies have pointed out to the amazing patterns that are hidden in some slokas, the nuances behind the mathematical logic and the tricks connected to solving problems. Although this topic is extensive, we can analyse the same through some slokas here.
There was a particular numerical code that was used in many slokas. Consider this sloka:
If you examine the words carefully, Kaadi Nava, starting from ka or the Hindi equivalent of ka, the sequence of 9 letters are represented by 1,2,..9. The same can be said for Taadi Nava , starting from ta, Paadi panchaka starting from pa, Yadyashtaka(1-8) starting from ya, and ksha that represents 0.
If you want to examine further, we can mark the letters of the alphabet in Hindi as follows:
ka1, kha–2, ga–3, gha–4, gna–5,
cha–6, cha–7, ja–8, jha–9.
ta–1, tha–2, da–3, dha–4, na–5,
Ta–6, Tha–7, Da–8, Dha–9.
pa–1, pha–2, ba–3, bha–4, ma–5.
ya–1, ra–2, la–3, va–4, Sa–5, sha–6, sa–7, ha–8.
Another significant sloka that reveals the PI value is:
gopeebhaagya maDhuvraathaH shruMgashodhaDhi saMDhigaH
khalajeevithakhaathaava galahaalaa rasaMDharaH
ga-3, pa-1, bha-4, ya -1, ma-5, Dhu-9, ra-2, tha-6, shru-5, ga-3, sho-5, dha-8, Dhi -9, sa-7, Dha- 9, ga-3, kha-2, la-3, jee-8, vi-4, tha-6, kha-2, tha-6, va-4, ga-3, la-3, ha-8, la-3, ra-2, sa-7, Dha-9, ra-2. Refer to the first sloka, and you get the numerical values for each letter.
In simple terms, we can explain the same in a different way. Generally, the Pi value is written as 3.14159. However, what is amazing is that eons ago, our ancestors had defeated time and discovered the same thorough a sloka.