#141 doubles equal doesn't handle NAN properly

1.10.2
closed-duplicate
nobody
5
2007-01-27
2005-04-08
Anonymous
No

CPPUNIT_ASSERT_DOUBLES_EQUAL(3.0,
std::numeric_limits<double>::quiet_NaN(), 1e-10) ;

does not cause an assertion when it obviously should as
I don't think most people think a quiet NaN is close to
3.0. This is a contrived example; I found the problem
due to an assembler routine with stack corruption
returning NaNs.

Discussion

  • Steven Robbins
    Steven Robbins
    2006-11-11

    Logged In: YES
    user_id=130415

    Duplicate of #754638.

     
  • Steven Robbins
    Steven Robbins
    2007-01-27

    Logged In: YES
    user_id=130415
    Originator: NO

    Closing as I just committed a fix.

     
  • Steven Robbins
    Steven Robbins
    2007-01-27

    • status: open --> closed-duplicate