Results 1 to 8 of 8

Thread: Pi

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2000
    Location
    Cairns,North Queensland, Australia
    Posts
    21

    Pi

    Why is it that in all of the books I have on VB and C++ they say that the value of PI to five decimal places is 3.14159 when I work it out to be 3.14285, am I missing something.

    Thanks in advance for any replies. AndyB.

  2. #2
    Hyperactive Member
    Join Date
    Jun 2000
    Location
    Gig Harbor, WA; Posts: 89950
    Posts
    360

    Talking

    HeHe
    You have a bigger piece of pi
    Sorry, coulden't resist!
    Mahalo
    VB6(SP5), VC++, COBOL, Basic, JAVA
    MBA, MCSD, MCSE, A+
    Computer Forensics

  3. #3
    Matthew Gates
    Guest
    I think all you need is 3.14 for PI, all that other crap is just there to confuse you .

  4. #4
    Guru Yonatan's Avatar
    Join Date
    Apr 1999
    Location
    Israel
    Posts
    892
    The value of Pi is approximately:
    Code:
    Pi = ~3.1415926535897932384626433832795 - thanks Windows Calculator! :rolleyes:
    This is an irrational and transcendental number.
    However, you are probably using another approximation:
    Code:
    Pi = 22/7 = 3.14285714285714285714285714285714.......
    This is close, but not exact. As you can easily see this is a rational number.
    To get it in VB, you can do this:
    Code:
    Dim Pi As Double
    Pi = Atn(1) * 4

  5. #5
    billfaceuk
    Guest
    Here you go...Pi to a few thousnad figures.
    Attached Files Attached Files

  6. #6
    Guru Yonatan's Avatar
    Join Date
    Apr 1999
    Location
    Israel
    Posts
    892
    Originally posted by billfaceuk
    Here you go...Pi to a few thousnad figures.
    I'm not sure anybody would want to build rocket guidance software in VB
    3.14 should be enough for those pretty circle thingies and if not, Atn(1) * 4 should be more than enough.

  7. #7
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923
    I know it to 10 decimal places off by heart..3.1415926535. I also know my bank's sort code and account number of my current account. I also know my mastercard number, it's expiry and I also know my debit card number and it's expiry!! guess I just like long numbers.

    And before you ask, no I ain't ganna post them!!

  8. #8
    Guru Yonatan's Avatar
    Join Date
    Apr 1999
    Location
    Israel
    Posts
    892
    I like the beginning of 'e'.
    Code:
    e = 2.718281828...
    e = 2.7 18 28 18 28 ...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width