Results 1 to 4 of 4

Math Help - accuracy

  1. #1
    Newbie
    Joined
    Jul 2010
    Posts
    15

    accuracy

    m1 = a + (b-a)/2

    m2 = (a+b)/2

    why is it that m2's result is more accurate than m1's result ?
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by TGASJOOL View Post
    m1 = a + (b-a)/2

    m2 = (a+b)/2

    why is it that m2's result is more accurate than m1's result ?
    Is that the complete question, is there not some contextual information you have omitted?

    (especially as in any compiled language the optimiser will change the rhs of the first into am form identical to the rhs of the second)

    CB
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Jul 2010
    Posts
    15
    normal floating point arithmetic of a pc applies in this case. I have seen many bisection algorithms do it like m2. Why does m1 produce a lower accurate result?
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by TGASJOOL View Post
    normal floating point arithmetic of a pc applies in this case. I have seen many bisection algorithms do it like m2. Why does m1 produce a lower accurate result?
    The more operations the larger the rounding errors will become, similarly one should avoid subtracting near equal quantities. All of which makes m1 probably better than m2.

    CB
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. How to calculate the accuracy of a map
    Posted in the Geometry Forum
    Replies: 0
    Last Post: June 10th 2010, 02:14 PM
  2. Limits of Accuracy
    Posted in the Math Topics Forum
    Replies: 0
    Last Post: October 8th 2009, 07:24 AM
  3. Checking for accuracy
    Posted in the Algebra Forum
    Replies: 1
    Last Post: August 24th 2009, 12:52 PM
  4. Accuracy of polynomials
    Posted in the Math Software Forum
    Replies: 0
    Last Post: May 7th 2009, 05:05 AM
  5. Approximations and Accuracy
    Posted in the Calculus Forum
    Replies: 0
    Last Post: December 10th 2008, 12:18 AM

Search Tags


/mathhelpforum @mathhelpforum