Menu

checking doubles for equality w/ an epsilon

Help
2003-01-28
2003-01-28
  • Sven Ludwig

    Sven Ludwig - 2003-01-28

    Hello,

    I don't know how I can check double values
    for equality in C++.

    I need a method that also lets me specify
    an epsilon for the accepted deviation.

    greetings
    Sven

     
    • Tom Plunket

      Tom Plunket - 2003-01-28

      CPPUNIT_ASSERT_DOUBLES_EQUAL(expected, actual, epsilon);

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.