Menu

#1607 Sum Error

closed
nobody
5
2009-03-02
2009-03-02
Anonymous
No

164.31 + 35.27 - 281.51;

return: -81.92999999999998

not: -81.93

trader1@mormons.com.br

Discussion

  • Robert Dodier

    Robert Dodier - 2009-03-02

    In Maxima, as in many other computer systems, arithmetic with floating point numbers is not exact.

    Example: 1.0 - 1.0/3 - 1.0/3 - 1.0/3;
    => 1.110223024625156E-16

    If you want to work with exact numbers in Maxima, try this:

    164 + 31/100 + 35 + 27/100 - (281 + 51/100);
    => -8193/100

    Closing this report, as it is not a bug.

     
  • Robert Dodier

    Robert Dodier - 2009-03-02
    • status: open --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB