Well, if you rad the post, my routine calculates pi using Liebniz's method. My gripe with his method is it takes 10,000 iterations to get to 3.14149, which is close to 3.14159, but still not quite there yet. So what I don't like about his method is that by the time you get 10,000, you have hundreds of decimal places present in the output, but only the first 3 are correct. So his method may be valid if you can continue it over a few million iterations to what, maybe 20 or 30 decimal places? How many iterations before 128-digits can be produced correctly? Frankly, I conclude the Liebniz method to simple algorithm for a pi estimator, but not a good practical pi calculator. It certainly can't be used for any of the mega-math pi calculations we see with correct output to trillions of digits.
An issue I would have with Ramanujan's method is it depends on constantly using the square root of 2, which is an irrational number. So we have an irrational number essentially corrupting proper fractions to obtain a transcendental (irrational) number, pi. What I do like about his method is it approximates pi for the first 5-digits with many less iterations as Liebniz's method.
Out of curiosity, do you know the calculations needed to obtain the numerators and denominators in each iteration in that table of Ramanujan's method? My hunch is they are log created, which I could not use, as I have not yet created a string math log routine.
Pete
An issue I would have with Ramanujan's method is it depends on constantly using the square root of 2, which is an irrational number. So we have an irrational number essentially corrupting proper fractions to obtain a transcendental (irrational) number, pi. What I do like about his method is it approximates pi for the first 5-digits with many less iterations as Liebniz's method.
Out of curiosity, do you know the calculations needed to obtain the numerators and denominators in each iteration in that table of Ramanujan's method? My hunch is they are log created, which I could not use, as I have not yet created a string math log routine.
Pete