Further information from the Boost bug tracker (below). It appears this is a bug in the math library [1] and has been known for nearly 8 years [2].
-Steve [1] http://sourceware.org/bugzilla/show_bug.cgi?id=3976 [2] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=153022 #2769: x86_64 + g++: wrong results for sin() --------------------------------------------+------------------------------- Reporter: anonymous | Owner: bgubenko Type: Bugs | Status: new Milestone: | Component: interval Version: Boost 1.34.1 | Severity: Problem Keywords: x86_64 interval transcendental | --------------------------------------------+------------------------------- Comment(by jewillco): The underlying C cos function has problems as well, even outside Boost.Interval. This bug appears to be a manifestation of something like http://sourceware.org/bugzilla/show_bug.cgi?id=3976 (which also applies to many other functions). According to that discussion, though, the standard library is not required to respect round-down or round-up for transcendental functions at all. -- Ticket URL: <https://svn.boost.org/trac/boost/ticket/2769#comment:2> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries. ----- End forwarded message -----
signature.asc
Description: Digital signature