You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Shogun can compare any objects via CSGObject::equals. This goes through all the parameters and compares their content and is used for integration testing and other useful things.
We currently compare floating point numbers as
if (CMath::abs(a-b)<eps) ....
This task is to change the comparison to handle all cases of floating point numbers, for the types float32,float64,floatmax. It should be a very few lines only. You should add a correctly implemented (templated) comparison function for all sorts of floating point numbers in CMath and call this method from the TParameter::compare_ptype method.
This will also fix broken integration tests on OSX
The text was updated successfully, but these errors were encountered:
Shogun can compare any objects via CSGObject::equals. This goes through all the parameters and compares their content and is used for integration testing and other useful things.
We currently compare floating point numbers as
if (CMath::abs(a-b)<eps) ....
This is a very bad thing, as it does not handle NaN, inf, etc
See http://floating-point-gui.de/errors/comparison/
This task is to change the comparison to handle all cases of floating point numbers, for the types float32,float64,floatmax. It should be a very few lines only. You should add a correctly implemented (templated) comparison function for all sorts of floating point numbers in CMath and call this method from the TParameter::compare_ptype method.
This will also fix broken integration tests on OSX
The text was updated successfully, but these errors were encountered: