pagmo2 icon indicating copy to clipboard operation
pagmo2 copied to clipboard

Comparing floating point numbers in tests : comparing difference instead of using ==

Open pgrt opened this issue 2 years ago • 0 comments

Hello,

In the hypervolume tests, some double are compared using ==, which can lead to test failures as it is safer to compare them by checking that their difference is small. In the attached patch I changed some of these tests so that the failing tests now pass, but there remains some other such tests to change I think.

Best, Pierre

check_equality_floating.txt

pgrt avatar Jun 10 '22 13:06 pgrt