tag:blogger.com,1999:blog-6692866151143183230.post3216421864735440772..comments2024-03-19T16:22:18.277+05:30Comments on jugad2 - Vasudev Ram on software innovation: A Pythonic ratio for pi (or, Py for pi :)Vasudev Ramhttp://www.blogger.com/profile/13568740634188042591noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-6692866151143183230.post-2609381736271126262016-06-27T22:32:33.856+05:302016-06-27T22:32:33.856+05:30@Anonymous: You are right. Thanks for pointing it ...@Anonymous: You are right. Thanks for pointing it out. Actually, I think I remembered that point - that pi (also e, and some other constants) are irrational numbers, but some time after publishing the post. Hey, it was taught in school, but that was some time ago ...<br /><br />For those who might not know what irrational numbers are - informally, they are numbers that cannot be expressed exactly as the ratio of two other integers, no matter to how many decimals you calculate them. I.e. pi is an irrational number because its exact value cannot be expressed with a finite number of decimal digits, no matter how long. e.g. whether you use 3.14 or 3.14159 or many more digits, it will still be inexact (though close, and closer the more digits you use), because the true value of pi is a floating point number that starts with 3.14 and the remaining digits after the decimal point, go on infinitely. Same for the constant e (with a different value, of course, starting with 2.71828).<br /><br />Another property of irrational numbers is that even the infinite sequence of their digits, does not consist of an infinite repetition of some finite repeating sequence. Because of that part of the definition, even though 1/3 equals 0.33333... (with an infinite number of digits 3 in the decimal part), it is not an irrational number, because it can be represented as the ratio of two other integers, i.e. 1 and 3.<br /><br />Other interesting related topics:<br /><br />More formal definition of irrational number than what I gave above (and pi is shown as the main example :)<br /><br />https://en.wikipedia.org/wiki/Irrational_number<br /><br />e:<br /><br />https://en.wikipedia.org/wiki/E_(mathematical_constant)<br /><br />Transcendental numbers:<br /><br />https://en.wikipedia.org/wiki/Transcendental_number<br /><br />https://en.wikipedia.org/wiki/Proof_that_e_is_irrationalVasudev Ramhttps://www.blogger.com/profile/13568740634188042591noreply@blogger.comtag:blogger.com,1999:blog-6692866151143183230.post-66669936384303363302016-06-27T19:24:13.594+05:302016-06-27T19:24:13.594+05:30RE: "to find a ratio (of two integers) that e...RE: "to find a ratio (of two integers) that equals the mathematical constant pi"<br /><br />Just to be pedantic, no, you can't find a ratio of two integers equal to pi, because pi is irrational and by definition unable to be expressed as a/b where a and b are integers. Proof of this has been known for quite some time: https://en.wikipedia.org/wiki/Proof_that_%CF%80_is_irrational<br /><br />What you have here are two integers a and b where a/b is a very good approximation of pi.Anonymousnoreply@blogger.com