- edited description
testSphere2 fails on 32 bit Linux
Issue #96
resolved
34/171 Test #34: testSphere2 ............................***Failed 0.13 sec
not equal:
expected = [
-nan, 0.0, -1,
-nan, 1, 0.0,
];
actual = [
0.0, 0.0, -1,
0.0, 1, 0.0,
];
actual - expected = [
-nan, 0.0, -7.49456053e-12,
-nan, 8.33333402e-12, 0.0,
];
/home/chris/git/gtsam/gtsam/geometry/tests/testSphere2.cpp:73: Failure: "assert_equal(expectedH, actualH, 1e-9)"
There were 1 failures
Comments (8)
-
reporter -
nan in expected?
-
reporter Expected in this test is a numerical derivative:
expectedH = numericalDerivative21(rotate_, R, p); R.rotate(p, actualH, boost::none); EXPECT(assert_equal(expectedH, actualH, 1e-9));
-
Works on mac, can someone with Linux look into it? @cbeall3 , @jdong37
-
reporter -
assigned issue to
- edited description
-
assigned issue to
-
reporter - changed status to resolved
Fixed in commit e1c0ad8. For the record, adding the following line to your code will cause floating point exceptions such as NaN to throw.
feenableexcept(FE_INVALID | FE_OVERFLOW);
-
Where should we add it?
-
reporter I'm not sure this is something that should be added in general, but I found it useful for debugging this issue in GDB. It's not portable, and might even affect performance, but not sure about the latter.
- Log in to comment