Interval cos fails on 64 bits platforms

Hi, I would like to use boost interval library in computer assisted proofs. However my machines are mostly 64 bits and the attached program fails -- returning [nan, nan] -- on them. On 32 bits, it works fine. Since this bug seems to be known [1], may somebody tell me how much progress has been done on solving it and whether there is there a workaround available? Thanks. Best, Christophe [1] https://svn.boost.org/trac/boost/ticket/2769 https://svn.boost.org/trac/boost/ticket/4011 #include <boost/numeric/interval.hpp> #include <fstream> #include <iostream> using namespace boost; using namespace numeric; using namespace interval_lib; typedef interval<double, policies<save_state<rounded_transc_opp<double> >, checking_base<double> > > I; template<class T, class Policies> std::ostream &operator<<(std::ostream &os, const boost::numeric::interval<T, Policies> &x) { os << "[" << x.lower() << ", " << x.upper() << "]"; return os; } int main() { std::cout << cos(I(-1, -0.6)) << "\n"; }
participants (1)
-
Christophe TROESTLER