The number Pi

The following is an old text file, that has remained on my computers from the mid 1980's. It was originally composed on a home brew 6502 based computer based mostly on a design by Tom L Billings, who knocked around Denver at that time. I designed a floppy disk drive controller for it, and with some help from others in the group managed to get the APEX operating system running. For reasons of compatibility with other computers running APEX, there were four other computer platforms running APEX at the time, you tried to restrict characters to Uppercase ASCII, and no more than 64 characters per line. The file is not historically accurate, but then we didn't have the internet back in those days. Now with this, and the smell of freshly heated solder flux in mind, I take you back to the days when if you wanted your own Microcomputer, you probably had to build it from scratch.

                PAGE ONE OF TWO                                          
                                                                         
I AM A MEMBER OF THE 6502 GROUP (A DENVER COMPUTER CLUB)                 
LAST MEETING ONE OF THE MEMBERS GAVE AN EXPLANATION OF HOW THE           
PI PROGRAM WORKS THE PI PROGRAM WHEN STARTED ASKS YOU HOW MANY           
PLACES YOU WOULD LIKE IT TO CALCULATE THE VALUE OF PI.                   
THEN DEPENDING ON YOUR ANSWER IT TIES UP YOUR COMPUTER FOR               
A WHILE...      POTENTIALLY FOREVER !                                    
HE HAS BEEN BRINGING UP THE LANGUAGE THAT PI WAS WRITTEN IN              
ON A 68000-STRIDE MACHINE AND AS A TEST OF THE LANGUAGE HE               
LET IT GRIND AWAY ON IT FOR A HALF A DAY AND IT FINALLY CHUCKED          
OUT THE ANSWER TO 25001 DECIMAL PLACES !  I TACKED THE 5 SHEET           
PRINTOUT OF THE ANSWER TO MY XEROX-LORE-DOOR AS AN INTERESTING           
BIT OF TRIVIA BUT WHAT IS ABSOLUTELY FASCINATING IS HOW SIMPLE           
THE ALGORITHM THAT COMPUTES IT REALLY IS IT IS BASED ON A                
FORMULA WORKED OUT IN THE EARLY 1700'S BY A MATHEMATICIAN                
THAT FOLLOWS.                                                            
                                                                         
        PI                   1                      1                    
       ---   =  4  ARCTAN ( --- )   -   ARCTAN ( ------ )                
        4                    5                    239                    
                                                                         
WELL ARCTANGENTS ARE MESSY THINGS WHEN NUMBERS HAVE 25000 PLACES         
OF ACCURACY SO THE LOGICAL CHOICE IS TO DISTILL THEM DOWN TO A           
SIMPLE TAYLOR SERIES EXPANSION                                           
                                                                         
                   3          5          7                               
       16   16(1/5)    16(1/5)    16(1/5)                                
PI = ( -- - -------- + -------- - ------- ) (THIS EXPANDS IN PAIR GROUPS)
       5       3          5          7                                   
                                                                         
                     |                   |                               
                     |-------------------|---PAIR GROUP                  
                     |                   |                               
                                                                         
                   3          5          7                               
      4    4(1/239)   4(1/239)   4(1/239)                                
+( - --- + -------- - -------- + -------- ) (THIS EXPANDS IN PAIR GROUPS)
     239      3          5          7                                    
                                                                         
THE REASON FOR EXPANDING IN GROUP PAIRS IS TO MINIMIZE                   
OSCILLATION AS THE TERMS IN EACH HALF TEND TO CANCEL THE ERROR.          
                                                                         
IF YOU DID THESE ON YOUR HANDY 4 FUNCTION CALCULATOR                     
YOU WOULD GET.                                                           
1ST TERM        1ST PASS        +3.2                                     
2ND TERM        1ST PASS        -.042666                                 
3RD TERM        1ST PASS        +.001024                                 
4TH TERM        1ST PASS        -.0000292571                             
                                                                         
1ST TERM        2ND PASS        -.0167364016                             
2ND TERM        2ND PASS        +.0000000976                             
3RD TERM        2ND PASS        -XXX                                     
4TH TERM        2ND PASS        +XXX                                     
                                                                         
XXX = TOO SMALL TO BE SIGNIFICANT                                        
                                                                         
ADDING TERMS GIVES      3.141592439                                      
PI EQUALS               3.141592654                                      
                                                                         
                PAGE TWO OF TWO                                          
                                                                         
IT SEEMS ABOUT AT LEAST ONE DIGIT OF ACCURACY PER TERM AN                
INTERESTING HISTORICAL FOOTNOTE THE MATHEMATICIAN WILLIAM SHANK          
ARMED WITH JUST SUCH AN EXPANSION DECIDED TO SPEND HIS LIFE              
CALCULATING PI OUT TO 640 DECIMAL PLACES IN MEMORY OF HIS                
EFFORT THEY'RE WAS A FOOTNOTE THAT HE MADE A MISTAKE AT THE              
528'TH DECIMAL PLACE.  A SHORT TIME LATER A COMPUTER CRANKED             
OUT THE ANSWER TO THE 1000 TH PLACE.  SO MUCH FOR HUMAN                  
PERSISTENCE OTHER CONSTANTS SUCH AS (LITTLE) 'E' THE BASE OF THE         
NATURAL LOGARITHMS CAN BE CALCULATED IN A SIMILAR MANNER                 
Now many years later, it's time to present corrections to historical errors in the previous file. The following is an historically correct, excerpt of the part about WILLIAM SHANK from

http://www.csolve.net/~markus/mmmpi.html

In 1873, Englishman William Shanks determined pi to 707 places in what was thought to be the world record, but little improvement was made regarding the notion of pi until people began to wonder what type of number pi was.

During the war in Britain, there was a school teacher named Ferguson whose job was to watch for fires. In order to help pass the time, he decided to calculate Shank's number for pi. Every time he got to the 528'th digit, his calculations disagreed with Shanks', and it turned out that Shanks' value, from the 528'th place on, was incorrect. Since then, anyone who puts in a claim to have a record must produce a second argument, using a different method, as a check.


Back to Sine Waves

The large print Giveth, and the small print Taketh away

CopyLeft License
Copyright © 2000 Jim Phillips

Know then: You have certain rights to the source data,
and distribution there of, under a CopyLeft License