Boost logo

Boost Users :

Subject: [Boost-users] Boost Interval Arithmetic Library: msvc_rounding_control.hpp broken in 64 bit msvc?
From: Iman Brouwer (iman.brouwer_at_[hidden])
Date: 2010-04-26 10:32:14


Hello,

When using the boost interval library we get a run-time assertion
failure in debug with 64 bit Visual Studio 2005 and up.

In file msvc_rounding_control.hpp, the function set_rounding_mode(..)
calls _control87(..) which in debug will cause an assert to fail.
According to microsoft documentation:

"On the x64 architecture, changing the floating-point precision is not
supported. If the precision control mask is used on that platform, the
invalid parameter handler is invoked, as described in Parameter
Validation."

Run-time library reference:
http://msdn.microsoft.com/en-us/library/e9b52ceh%28VS.80%29.aspx

Visual Studio 2010 documentation:
http://msdn.microsoft.com/en-us/library/c9676k6h.aspx

In release the invalid parameter handler is not invoked so the code
runs without complaining, but the rounding-mode is of course not
changed.

Did anybody else run into this problem?

Iman


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net