Boost logo

Boost :

From: Jason McCarty (bclg_at_[hidden])
Date: 2003-07-29 12:09:19


Hi,

I came across a likely bug in boost::numeric::tan(interval) today.
Calling tan on an interval with a save_state rounding policy fails to
compile on line 109 of transc.hpp, even though an interval with a
save_state_nothing policy compiles correctly. I think this is because of
a typo; the line
  R tmp = fmod((const I&)x, pi);
was probably meant to read
  R tmp = fmod((const R&)x, pi);
so that the call to fmod isn't ambiguous (why gcc didn't tell me it was
ambiguous, I can't tell). It presumably works with save_state_nothing
because it's equivalent to the unprotected version.

I've attached a test case, and the output produced by g++-3.3.

Jason McCarty





Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk