En réponse à Jason McCarty <[EMAIL PROTECTED]>: > 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 misoptimization. Regards, Guillaume _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost