Was value of pi really defined in a sloka?
It looks this shloka originates from Bharati Krishna Tirthaji's system of so-called "Vedic Mathematics". Note that despite its name, it's widely agreed that Tirthaji's system isn't actually Vedic in origin; Tirthaji claimed that his 16 Sutras were from the Parishishta of the Atharvana Veda, but they're not actually found there. (Here's a good paper discussing the provenance of Tirthaji's Vedic Mathematics system. For the real mathematics of the Vedic period see here.) And the supposed shloka in question isn't even a correct Katapayadi translation of pi; here is what this book says:
Now we know enough about the authentic Katapayadi system to identify the origin of the Guru [Tirthaji]'s verse... According to the guru [Tirthaji], decoding the verse produces the following number:
31415 92653 58969 32384 62643 38327 92
In this number we recognize the first 31 decimals of pi... In the authentic Katapayadi system, the decimals are encoded in reverse order. So according to the authentic system, the verse is decoded as
29723 83346 26483 23979 85356 29514 13.
We conclude that the verse is not medieval, and certainly not Vedic. In all likelihood, the guru [Tirthaji] is the author of the verse
Note: “The question: Was value of pi really defined in a sloka?” is licensed by Stack Exchange Inc (https://hinduism.stackexchange.com/); user contributions licensed under CC BY-SA.