|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r86711 - trunk/boost/math/tools
From: john_at_[hidden]
Date: 2013-11-15 13:24:31
Author: johnmaddock
Date: 2013-11-15 13:24:31 EST (Fri, 15 Nov 2013)
New Revision: 86711
URL: http://svn.boost.org/trac/boost/changeset/86711
Log:
Add comments and fixes to FPU flags manipulation.
Text files modified:
trunk/boost/math/tools/config.hpp | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
Modified: trunk/boost/math/tools/config.hpp
==============================================================================
--- trunk/boost/math/tools/config.hpp Fri Nov 15 12:31:07 2013 (r86710)
+++ trunk/boost/math/tools/config.hpp 2013-11-15 13:24:31 EST (Fri, 15 Nov 2013) (r86711)
@@ -285,7 +285,19 @@
}} // namespace boost namespace math
-#if ((defined(__linux__) && !defined(__UCLIBC__)) || defined(__QNX__) || defined(__IBMCPP__)) && !defined(BOOST_NO_FENV_H)
+#ifdef __GLIBC_PREREQ
+# if __GLIBC_PREREQ(2,14)
+# define BOOST_MATH_HAVE_FIXED_GLIBC
+# endif
+#endif
+
+#if ((defined(__linux__) && !defined(__UCLIBC__) && !defined(BOOST_MATH_HAVE_FIXED_GLIBC)) || defined(__QNX__) || defined(__IBMCPP__)) && !defined(BOOST_NO_FENV_H)
+//
+// This code was introduced in response to this glibc bug: http://sourceware.org/bugzilla/show_bug.cgi?id=2445
+// Basically powl and expl can return garbage when the result is small and certain exception flags are set
+// on entrance to these functions. This appears to have been fixed in Glibc 2.14 (May 2011).
+// Much more information in this message thread: https://groups.google.com/forum/#!topic/boost-list/ZT99wtIFlb4
+//
#include <boost/detail/fenv.hpp>
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk