Boost logo

Boost Users :

From: Guillaume Melquiond (guillaume.melquiond_at_[hidden])
Date: 2007-01-26 05:32:20


Le jeudi 25 janvier 2007 à 10:25 +0100, Tobias Munk a écrit :
> I am using a custom rounding policy for transcendental functions,
> based on crlibm and defined in the manner of
>
> libs/numeric/interval/examples/transc.cpp
>
> In the documentation of crlibm, it is recommended to call the init
> function crlibm_init() before calling one of their transcendental
> functions. My question now is: does anybody know if calling this init
> function collides with any of the boost.numeric.interval internal
> algorithms?

If you are using crlibm functions outside of the interval functions, you
can use a single crlibm_init for your whole program, as the interval
functions do not assume anything about the state of the floating-point
unit.

Interval functions, however, relies on a special rounding mode. So, at
the entry points of your policy, the rounding mode may not be what
crlibm expects, so crlibm_init has to be called in your policy
functions. And you have to call crlibm_exit to restore the rounding mode
before they return, as the interval computations may not be finished
yet.

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