Hello,
Interval calculations with rounded_arith_opp in Release configuration under
msvc 14 result in zero-size intervals. For example consider following:
#include <iostream>
#include
int main(int argc, char * argv[])
{
unsigned int ctrl = _control87(0, 0);
_control87(_EM_INEXACT | _RC_UP, _MCW_EM | _MCW_RC);
using namespace boost::numeric::interval_lib;
typedef typename unprotect< boost::numeric::interval<double> >::type
interval_t;
interval_t test = interval_t(1.) / interval_t(3.);
std::cout << "test.lower() != test.upper(): " << std::boolalpha
<< (test.lower() != test.upper()) << std::endl;
return 0;
}
This test unexpectedly prints:
test.lower() != test.upper(): false
Tested on x64 platform with /fp:strict and /fp:precise under MS Visual
Studio Community 2015 Version 14.0.24720.00 Update 1, Boost 1.60.
I've already reported this to https://svn.boost.org/trac/boost/ticket/12018
There you can find some details of what I think is going wrong and proposed
workaround patch.
I didn't create pull request because I'm not sure if my patch is a correct
workaround. Maybe someone will propose more appropriate solution.
Best regards,
Peter Azmanov.