Info

130 CENTER STREET E. STROUDSBURG, PA. 18301

Allow Two Weeks for Delivery P S. MONEY ORDERS ARE RUSH ORDERS

5 ' BASED ON A SERIES OF FRACTIONS IN THE FORM: (PI—3)/4 = 1/(2*3*4) - 1/(4*5*6) + 1/(6*7*8) -1/(8*9*10) + ...

15 INPUT "ENTER THE SIZE OF THE SAMPLE TO BE RUN";T

25 J=4: FOR 1=1 TO T: A(l)=1/(J*(J+1)*(J+2)): J=J+4: NEXT I

35 J=6: FOR l=2 TO T: B(l)=1/(J*(J+1)*(J+2)): J=J+4: NEXT I

40 FOR 1=1 TO T: C(I)=B(I)-A(I): CC=CC+C(I): NEXT I 45 PI=(4*CC)+3: PRINT @325,T,PI 50 END

An array of fractions to be subtracted is produced in A(I), and an array of fractions to be added is produced in B(I) after B(l) has been defined. This series may be the most accurate approximation that you produce.

Table 4

Sample Data from Program 4

0 0

Post a comment