|
Boost Users : |
From: Mark Beinker (mark.beinker_at_[hidden])
Date: 2007-10-07 15:42:51
Hi,
I was trying to use the boost interval class using g++ under cygwin and
ubuntu, but unfortunately, I have trouble to use the exp function.
The following code:
#include <iostream>
#include <cmath>
#include <boost/numeric/interval.hpp>
#define DOUBLE boost::numeric::interval<double>
int main(int argc, char** argv)
{
DOUBLE x(4,5);
std::cout.precision(19);
DOUBLE res = exp(x);
std::cout<<'['<<res.lower()<<", "<<res.upper()<<']'<<std::endl;
return 0;
}
generates the following compile error:
/usr/include/boost/numeric/interval/transc.hpp: In function
`boost::numeric::interval<T, Policies> boost::numeric::exp(const
boost::numeric::interval<T, Policies>&) [with T = double, Policies =
boost::numeric::interval_lib::policies<boost::numeric::interval_lib::rounded_math<double>, boost::numeric::interval_lib::checking_strict<double> >]':
itest.cpp:14: instantiated from here
/usr/include/boost/numeric/interval/transc.hpp:34: error: 'struct
boost::numeric::interval_lib::rounded_math<double>' has no member named
'exp_down'
itest.cpp:14: instantiated from here
/usr/include/boost/numeric/interval/transc.hpp:34: error: 'struct
boost::numeric::interval_lib::rounded_math<double>' has no member named
'exp_up'
I use boost version 1.34.1.
Any idea why this doesn't work?
Regards,
Mark
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