-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
Description
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