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
because we use _MCW_EM | _MCW_RC instead of _MCW_RC only.
Shouldn't both systems set the same FP settings? If yes - what should they adjust? Both systems should adjust rounding only, or both should adjust rounding and exception masking?
If we only want to change rounding control bits - it is enough to remove _MCW_EM | part of that line and both systems will throw FP exception.
The text was updated successfully, but these errors were encountered:
VS 19 vs GCC 12
If you build and run the following sample with both compilers:
You will see how it fails with FP exception on linux, but never fails on windows.
The reason is simple:
On linux we adjust only rounding mode
interval/include/boost/numeric/interval/detail/c99sub_rounding_control.hpp
Line 27 in 2eda741
But on windows in addition to rounding we also mask all the FP exceptions (turn off corresponding flags)
interval/include/boost/numeric/interval/detail/msvc_rounding_control.hpp
Line 93 in 2eda741
_MCW_EM | _MCW_RC
instead of _MCW_RC only.Shouldn't both systems set the same FP settings? If yes - what should they adjust? Both systems should adjust rounding only, or both should adjust rounding and exception masking?
If we only want to change rounding control bits - it is enough to remove
_MCW_EM |
part of that line and both systems will throw FP exception.The text was updated successfully, but these errors were encountered: