interval library: simple rounding control?
I am trying to use the boost interval library. It works fine, until I try to use exp, log, or one of the goniometric functions: error: 'struct boost ::numeric::interval_lib::detail::save_state_unprotected< boost::numeric::interval_lib::rounded_arith_opp< double, boost::numeric::interval_lib::rounding_control<double> >
' has no member named 'cos_up'
and similar errors for cos_down, sin_up, etc. I read the documentation, but could not find what to do about this. From http://www.boost.org/libs/numeric/interval/doc/rounding.htm, I get the impression that I need to write a rounding policy, but am at a loss about how to do this. My problem is twofold: - getting this to be compiled using erroneous versions of this where cos_up and cos_down simply call 'cos' - getting correct versions of cos_up, etc. Any help is appreciated. Reinder
Le jeudi 08 décembre 2005 à 10:53 +0100, Reinder Verlinde a écrit :
I am trying to use the boost interval library. It works fine, until I try to use exp, log, or one of the goniometric functions:
I read the documentation, but could not find what to do about this. From http://www.boost.org/libs/numeric/interval/doc/rounding.htm, I get the impression that I need to write a rounding policy, but am at a loss about how to do this.
My problem is twofold: - getting this to be compiled using erroneous versions of this where cos_up and cos_down simply call 'cos'
The findroot_demo.cpp example uses such an interval type:
typedef interval
- getting correct versions of cos_up, etc.
The transc.cpp example uses an interval type that relies on the MPFR library to implement correctly rounded versions of the elementary functions. Best regards, Guillaume
In article <1134066334.6700.153.camel@localhost>,
Guillaume Melquiond
Le jeudi 08 décembre 2005 à 10:53 +0100, Reinder Verlinde a écrit :
I am trying to use the boost interval library. It works fine, until I try to use exp, log, or one of the goniometric functions:
I read the documentation, but could not find what to do about this. From http://www.boost.org/libs/numeric/interval/doc/rounding.htm, I get the impression that I need to write a rounding policy, but am at a loss about how to do this.
My problem is twofold: - getting this to be compiled using erroneous versions of this where cos up and cos down simply call 'cos'
The findroot demo.cpp example uses such an interval type:
typedef interval
, checking base<double> > > I; - getting correct versions of cos up, etc.
The transc.cpp example uses an interval type that relies on the MPFR library to implement correctly rounded versions of the elementary functions.
Best regards,
Guillaume
Oops. I had grepped inside 'boost_1_33_1/boost' for cos_up without results. I somehow had 'forgotten' that the boost distribution has other directories than that one. Thanks for the pointer. Reinder
participants (2)
-
Guillaume Melquiond
-
Reinder Verlinde