answersLogoWhite

0


Best Answer

I am not familiar with C but I can tell you the following which will be of use:

First of all it is simply impossible to find the exact value of pi. Pi is an irrational number which has an infinite number of digits which do not repeat with any pattern. Therefore the best you can ever hope to do is to find an approximation for pi. There are different ways to do this and I will show you two below. These methods calculate an approximation of pi by adding together a series of terms. The more terms that are added together the more precise the answer will be. These methods can therefore be used no matter which computer language you are using.

Method 1.

Pi2 / 6 = (1/12) + (1/22) + (1/32) +(1/42) + (1/52)... to infinity

You can therefore write a loop which will add together these terms by simply adding 1 to a variable each time the loop executes. When you have done this however many times you wish (and remember that the more times the loop runs the more precise our answer will be) you then multiply the result by 6. This value is then equal to an approximation of pi squared. You therefore now find the square root of the result!

Method 2

Using similar principles to the above but using a different formula:

Pi / 4 = (1/1) + (-1/3) + (1/5) + (-1/7)... to infinty

Thus Pi / 4 = (1/1) - (1/3) + (1/5) - (1/7) to infinity

Again the pattern whilst slightly harder, is still easy to spot, and can be written as a loop in a computer program where a variable is changed on each loop and run as many times as desired.

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you find value exact value of PI in C language?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Could you find the circumference of a circle using the exact value for pi?

Yes, you could if you knew the exact value for pi as well as the diameter of the circle. Multiply the diameter by the exact value for pi to get the circumference. However, it is impossible because the exact value for pi is not known. It is only known to about a trillion decimal places, but the exact value is not known.


Exact value of pi to 10 decimal places?

3.1415926536 is to 10 places but not exact. The only exact value of pi is pi itself. So any exact answer involving pi would include pi in the answer.


Can you show me a smart math problem?

Find the exact value of the mathematical symbol pi.


Can you find the circumference of a circle using the exact value for pi?

No, because pi has no exact value, it is neverending. You can get close by using 3.14, but never will you get it exactly right. Up to date, about 4 trillion digits have been calculated.


What is the exact history of mathematical pi?

The circumference of any circle when divided by its diameter has the exact value of pi


What is the rounded exact value of pi?

3.1428


What are some famous mathematical problems pi?

If the value of pi is the circumference of any circle divided by its diameter then what is the true exact value of pi? Why is it that the exact area of a circle can never be found?


What was the value of pi obtained by the babylo nians?

They gave it a value of about 3 but even today we do not know the exact value of pi


How was the value of pi ditermined?

The value of pi is determined by dividing a circle's circumference by its diameter and an exact value has never been worked out because pi is an irrational number.


What is the exact value of pi x100000000000000000000000000000000000000?

The exact value could never be expressed as a number, as pi is an irrational number. The integer value would be: 31415926535897932384626433832795028841 If you want a slightly more accurate value: 31415926535897932384626433832795028841.9716939937510582097494 If you want an exact value: ∞ (∫e-x² dx)2 × 1038 -∞


Why the value of pie is 227?

Because 22/7 is the approximate value of pi as a fraction but the exact value of pi has never been determined.


What is the exactly value of pi?

The exact value of pi is the ratio of the circumference of a circle to its diameter. It cannot be printed exactly in numbers.