Boost logo

Boost :

From: gmelquio_at_[hidden]
Date: 2003-07-29 15:07:46

En réponse à Jason McCarty <bclg_at_[hidden]>:

> 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.

Strangely, in my own version, it is already written as
  R tmp = fmod((const R&)x, pi);
However it is the CVS version, so maybe you are using Boost 1.30.0 and there was
a mistake at that time (I don't have the code at hand to verify). Anyway, sorry
for the trouble.

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

Thanks for pointing that out. Even if this typo was already corrected, it
allowed me to detect another typo at the previous line :-). This one however
didn't produce compilation error or runtime misbehavior, it was just a



Boost list run by bdawes at, gregod at, cpdaniel at, john at