Results 1 to 2 of 2

Thread: Trouble with accuracy in VB6

  1. #1

    Thread Starter
    Member
    Join Date
    Aug 2007
    Posts
    36

    Trouble with accuracy in VB6

    Hello there,

    the result of the computation below in VB6 contradicts a sampe computation in a text book. Could you please plug this in for me.........?


    Const dblPi as double = 3.141592

    X = ((2 * dblPi * 288) / 365) * (180 / dblPi)


    My result is 284.054 degree, while the text book suggests 284.16 degree.

    I don't know what's going on here - I would be grateful for any feedback.

    Thank you!

  2. #2
    Frenzied Member zaza's Avatar
    Join Date
    Apr 2001
    Location
    Borneo Rainforest Habits: Scratching
    Posts
    1,486

    Re: Trouble with accuracy in VB6

    This isn't going to be an accuracy issue. Something is awry somewhere. In your calculation above, the dblPi drops out (because it is on the top and bottom of the equation), so you are left with:

    X = 2 x 288 x 180 / 365 = 284.055


    Either you have missed something out or there is a typo in the book.


    zaza
    I use VB 6, VB.Net 2003 and Office 2010



    Code:
    Excel Graphing | Excel Timer | Excel Tips and Tricks | Add controls in Office | Data tables in Excel | Gaussian random number distribution (VB6/VBA,VB.Net) | Coordinates, Vectors and 3D volumes

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