# {JAVA} Calculating PI without using class.math

Tags:

Last response: in Applications

ECSD

August 17, 2012 3:15:45 PM

Is it possible to calculate the Number PI without using the java class math?

I found this formula to calculate PI.

I think i need some int arrays to save the numbers but actually i'm stumped.

Has anyone a hint?

I found this formula to calculate PI.

I think i need some int arrays to save the numbers but actually i'm stumped.

Has anyone a hint?

More about : java calculating class math

ECSD

August 18, 2012 11:35:32 AM

ECSD

August 18, 2012 1:08:38 PM

*The ! inverts the boolean result of whatever follows it. So if "plus" is true, it will return false and vice versa.

ECSD

August 18, 2012 1:44:29 PM

boolean plus = false;

And as for i, it's declared in the loop at line 3:

int i = 0;

Finally, operator ! flips the boolean value, if it was true, it becomes false, and if it was false, it becomes true.

Anonymous

August 27, 2012 5:55:26 PM

I was given the same task as ECSD, using the arcsine formula from the first post. Further info: when x=0.5 --> 6*arcsin(x) = Pi . That's how the formula might be incorporated. I'm completely new to Programming and I'm confused as to how to calculate to a power without using the Math.Class... I have the instructions to not use the Math.Class and to save the first 10000 digits of Pi in int-arrays.. any advice would be much appreciated

Anonymous

August 28, 2012 11:59:16 AM

Read discussions in other Applications categories

!