Boost logo

Boost Users :

From: Guillaume Melquiond (guillaume.melquiond_at_[hidden])
Date: 2005-12-08 13:25:34


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<double,
                   policies<save_state<rounded_transc_opp<double> >,
                            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


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