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
Somehow calling std::round in my code ends up calling the round implementation in mlpack/core/math/round.hpp
The behaviour of the rounding implemented here is different to std::round.
In particular -0.5 is rounded toward 0, instead of away as per the c++ standard.
Oh wow, that file is something I have not seen in years. I don't think it's needed at all anymore (and as you pointed out its behavior is incorrect anyway!). I opened #3570 to remove the file entirely.
mlpack 4.0.1
Somehow calling std::round in my code ends up calling the round implementation in mlpack/core/math/round.hpp
The behaviour of the rounding implemented here is different to std::round.
In particular -0.5 is rounded toward 0, instead of away as per the c++ standard.
MSVC does implement round now.
see: https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/round-roundf-roundl?view=msvc-170
I think this could be modified with a guard on the version number?
eg: #if _MSC_VER < 1930
The text was updated successfully, but these errors were encountered: