
-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Mathias Gaunard Sent: Sunday, August 21, 2011 3:56 PM To: boost@lists.boost.org Subject: Re: [boost] [Units] test_trig fails on Sandia-darwin-4.4 (caused by compile-time evaluation of math functions)
<snip>
I don't know what BOOST_CHECK_CLOSE_FRACTION does,
It allows an 'approximately equal' check, with a tolerance, usually an epsilon or two for built-in functions. BOOST_CHECK_CLOSE_FRACTION(v1, v2, std::numeric_limits<double>::epsilon()); Using exact comparison (BOOST_CHECK) is always dodgy for floating point.
but I don't think there is any guarantee at all about the accuracy of the standard mathematical functions.
Definitely not, especially for corner cases. Paul --- Paul A. Bristow, Prizet Farmhouse, Kendal LA8 8AB UK +44 1539 561830 07714330204 pbristow@hetp.u-net.com