Click to See Complete Forum and Search --> : pi calacalter for linux?


raggie30
02-20-2003, 03:50 AM
pi calacalter for linux? is there one.

raggie30
02-20-2003, 04:01 AM
its a benchmark btw

quietguy47
02-20-2003, 09:20 AM
I guess it would depend on which distrobution you are using. I use Slackware which has a scientific calculator in utilities.
I'm sure if whatever distro you are using doesn't have one, you can download one from freshmeat.net.

Resident_Geek
02-22-2003, 10:10 PM
Write your own - 4 - 4/3 + 4/5 - 4/7 + 4/9... into infinity. If you know Java, the java.math.BigDecimal class should help you.

Kralgi
02-23-2003, 03:28 PM
Hmm, there's a constant in math.h which is M_PI, btw, you can calculate it by yourself.
There is something which is called leibnitz row.
which is calculated like this:

1 1 1 1 1 1 1
---*pi = 1 - --- + --- - --- + --- - --- = ... +- -------
4 3 5 7 9 11 2*n-1

hmm, I have the C source for doing this thing, but I dont think that there is some problem of implementing it by yourself.

raggie30
02-23-2003, 03:55 PM
lol i can barely run linux much less do what u r saying:)

bwkaz
02-23-2003, 06:36 PM
Originally posted by Kralgi
1 1 1 1 1 1 1
---*pi = 1 - --- + --- - --- + --- - --- = ... +- -------
4 3 5 7 9 11 2*n-1 I think you wanted code tags around that:

1 1 1 1 1 1 1
---*pi = 1 - --- + --- - --- + --- - --- + ... +- -------
4 3 5 7 9 11 2*n-1 Looks much better, don't you think?

And yes, this is exactly the same thing that Resident_Geek was saying. ;)

sean_foulkes
02-24-2003, 02:19 AM
calculate pi? you don't get out much do you:D

Kralgi
02-24-2003, 10:56 AM
bwkaz, tnx , that's what I've wanted to say..
how did you fix it out?:)

bwkaz
02-24-2003, 11:04 AM
Code tags. You can hit quote on my post to see how they work (please, don't hit submit though), but basically, you put [ code] before the stuff you want to keep the spaces in, and [ /code] after it. But you've got to get rid of the spaces in the tags first (they're only there so that you can see what they look like)..

raggie30
02-24-2003, 11:59 AM
i used to use the 1 million calcation to bench my windows machinee i just want to make sure my linux pc is as fast

Kralgi
02-25-2003, 02:28 PM
Gotcha! tnx a lot.