dimanche 22 mars 2015

BOOST_CHECK_CLOSE fails even if the two values are below the threshold

I'm performing unit testing using boost. When I use BOOST_CHECK_CLOSE I get this failure message:



difference{inf%} {-6.9388939e-18} and (0.0){0} exceeds 1.0000000000000001e-05%


It sounds weird to me as the difference between -6.9388939e-18 and 0.0 is below 1.0000000000000001e-05%. Furthermore, I do no understand why it says that the difference is infinite.


Any idea about the reason behind this behavior?


Aucun commentaire:

Enregistrer un commentaire