If you want to see the applet work, visit Sun's website at, download and install Java VM and enjoy the applet. This applet requires Sun's Java VM 2 which your browser may perceive as a popup. Arndt and Haenel found an inaccuracy in their derivation and changed that to + 1, the value used in the applet.) ( Rabinowitz and Wagon argued that it takes, where is the floor function, digits to calculate n decimal digits. release as true digits of π all but the current held predigit.increase all other held predigits by 1(9 becomes 0).set the current predigit to 0 and hold it.If q is 9, add q to the queue of held predigits. Adjust the predigits: If q is neither 9 nor 10, release the held predigits as true digits of π and hold q.Get the next predigit: Reduce the leftmost entry of A (which is at most 109 (= 9 - 10 + 191)) modulo 10.The last integer carried (from the position where i - 1 = 2) may be as large as 19. Leave r in place and carry q(i - 1) one place left. Put A into regular form: Starting from the right, reduce the ith element of A (corresponding to b-entry (i - 1)/(2i - 1)) modulo 2i - 1, to get a quotient q and a remainder r. Multiply by 10: Multiply each entry of A by 10. The algorithm accounts for this circumstance. In this case, 1 should be carried to the previous digit and, if the latter is 9, even further left. It may (and does) happen that the algorithm spews as a decimal digit the number 10. However, conversion runs into complications due to the radix not being constant. As the formula shows, in this system the representation of π is exceedingly simple: π = (2 2, 2, 2. This last expression is a representation of π in a system with a mixed-radix base b = (1/3, 2/5, 3/7, 4/9. Rabinowitz has realized, there indeed was such a system albeit an unusual one. )))))),īut was there a positional system in which π was known? As S. The great insight was to recognize some of the many known formulas for π as representations of that number in exotic positional system and undertake the task of converting them to the decimal representation.īoth representations are thought in the form utilized by Horner's method. In fact the algorithm for conversion between bases outputs one digit at a time as a true spigot algorithm. The fundamental idea is that of base conversion. Among other sources, the algorithm is described in a very weill written book by Arndt and Haenel. The algorithm generates the digits sequentially, one at a time, and does not use the digits after they are computed. Rabinowitz in 1991 and investigate by Rabinowitz and Wagon in 1995. The spigot algorithm for calculating the digits of π and other numbers have been invented by S.
0 Comments
Leave a Reply. |