Boost logo

Boost Users :

From: Guillaume Melquiond (guillaume.melquiond_at_[hidden])
Date: 2007-02-21 04:27:08


Le mardi 20 février 2007 à 18:56 +0000, Marco Correia a écrit :
> Hi,
>
> I'm a little bit confused about the documentation in
> http://www.boost.org/libs/numeric/interval/doc/rounding.htm, in the
> subsection "Transcendental functions". Does the "Please note" paragraph means
> that the provided classes for transcendal functions (_opp and _std) do not
> guarantee the inclusion property?

Yes.

> >From what I understood it says that it depends on the implementation of the
> std::* math functions, that, in most cases, don't obey current rounding mode.
> Am I getting this right?

Yes.

> In case I am, does anyone knows if I'm safe with gcc std library (perhaps by
> using the -frounding-math switch)?

No, unfortunately.

You have to rely either on a library that provides functions rounded in
accordance with the rounding mode of the processor like Sun's libmcr, or
on a library that provides functions with explicit rounding direction
like MPFR or CRlibm. The transc.cpp example file of the library shows
how to write a class relying on MPFR; for Boost 1.35, it may be
replaced / extended with a class relying on CRlibm.

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