![]() To get one million decimal places, I've done a simple implementation of the multi-length arithmetic operations that I need, using a big array of ints. Multi-length arithmeticĪ 32-bit integer only gives us about 9 significant digits. To get 1,000,000 decimal places accuracy for pi, we need about 715,000 terms of the tan -1(1/5) series and about 210,000 terms of the tan -1(1/239) series, but this doesn't have to be worked out in advance, the attached program stops automatically when it determines that the required accuracy has been reached. īy including sufficiently many terms of this series, we can achieve any desired accuracy. Tan -1() is the Inverse Tangent function, and I use the Maclaurin series to calculate it: I've chosen a method that is fairly simple and converges reasonably fast. ![]() Some are simple to implement but converge very slowly. Some methods converge rapidly but are complicated to implement. I'm not going to try to write pi as the Greek letter in this article, because some browsers might show it incorrectly. It is an infinitely long non-recurring decimal number. It is defined as the ratio of a circle's circumference to its diameter, but it crops up in all sorts of places in mathematics. To save the console output to a text file, use the menu item Edit -> Save Console to File.Pi is one of the most important numbers in mathematics. I can only vouch for the first thirty or so digits, personally. I used the Xmaxima console for this result: (%i1) bfloat(%pi),fpprec:1000 This is an open source (GPL) software project, available from Sourceforge. The symbolic and numeric calculation package Maxima appears capable of doing this rather easily. Not having used any of these other utilities I am unable to comment on individual features. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |