math.answers.com/math-and-arithmetic/How_do_you_find_value_exact_value_of_PI_in_C_language

Preview meta tags from the math.answers.com website.

Linked Hostnames

8

Thumbnail

Search Engine Appearance

Google

https://math.answers.com/math-and-arithmetic/How_do_you_find_value_exact_value_of_PI_in_C_language

How do you find value exact value of PI in C language? - Answers

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 infinityYou 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 2Using similar principles to the above but using a different formula:Pi / 4 = (1/1) + (-1/3) + (1/5) + (-1/7)... to infintyThus Pi / 4 = (1/1) - (1/3) + (1/5) - (1/7) to infinityAgain 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.



Bing

How do you find value exact value of PI in C language? - Answers

https://math.answers.com/math-and-arithmetic/How_do_you_find_value_exact_value_of_PI_in_C_language

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 infinityYou 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 2Using similar principles to the above but using a different formula:Pi / 4 = (1/1) + (-1/3) + (1/5) + (-1/7)... to infintyThus Pi / 4 = (1/1) - (1/3) + (1/5) - (1/7) to infinityAgain 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.



DuckDuckGo

https://math.answers.com/math-and-arithmetic/How_do_you_find_value_exact_value_of_PI_in_C_language

How do you find value exact value of PI in C language? - Answers

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 infinityYou 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 2Using similar principles to the above but using a different formula:Pi / 4 = (1/1) + (-1/3) + (1/5) + (-1/7)... to infintyThus Pi / 4 = (1/1) - (1/3) + (1/5) - (1/7) to infinityAgain 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.

  • General Meta Tags

    22
    • title
      How do you find value exact value of PI in C language? - Answers
    • charset
      utf-8
    • Content-Type
      text/html; charset=utf-8
    • viewport
      minimum-scale=1, initial-scale=1, width=device-width, shrink-to-fit=no
    • X-UA-Compatible
      IE=edge,chrome=1
  • Open Graph Meta Tags

    7
    • og:image
      https://st.answers.com/html_test_assets/Answers_Blue.jpeg
    • og:image:width
      900
    • og:image:height
      900
    • og:site_name
      Answers
    • og:description
      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 infinityYou 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 2Using similar principles to the above but using a different formula:Pi / 4 = (1/1) + (-1/3) + (1/5) + (-1/7)... to infintyThus Pi / 4 = (1/1) - (1/3) + (1/5) - (1/7) to infinityAgain 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.
  • Twitter Meta Tags

    1
    • twitter:card
      summary_large_image
  • Link Tags

    16
    • alternate
      https://www.answers.com/feed.rss
    • apple-touch-icon
      /icons/180x180.png
    • canonical
      https://math.answers.com/math-and-arithmetic/How_do_you_find_value_exact_value_of_PI_in_C_language
    • icon
      /favicon.svg
    • icon
      /icons/16x16.png

Links

58