BBS: Inland Empire Archive Date: 05-08-92 (22:27) Number: 169 From: DAVID BLISS Refer#: NONE To: ANDY KIDLE Recvd: NO Subj: Programming Pi Conf: (2) Quik_Bas
> QUICKC for programming. Here are the two series,
> so if you can help, let me know:
> pi = 4(1 - 1/3 + 1/5 - 1/7 + 1/9 - 1/11 +......)
I can write you a loop to calculate this, but i'd need more
time to work on the other one...
for x=1 to iterations%
if (x/2=int(x/2)) or (x=1) then
t=t+1/((x*2)+1)
else
t=t-1/((x*2)+1)
end if
next x
pi=4*(1-t)
That SHOULD work. if not, fiddle it until it does. I'll
look at the second series tonight and come up with some
finished code for you by sunday.
dave
---
* Origin: The Aliens BBS, Simpsonville SC, 8032347195 (1:3639/4)

Books at Amazon:
Back to BASIC: The History, Corruption, and Future of the Language
Hackers: Heroes of the Computer Revolution (including Tiny BASIC)
Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution
The Advent of the Algorithm: The Idea that Rules the World
Moths in the Machine: The Power and Perils of Programming
Mastering Visual Basic .NET