Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r65015 - in trunk/boost/math/special_functions: . detail
From: john_at_[hidden]
Date: 2010-08-26 08:29:17


Author: johnmaddock
Date: 2010-08-26 08:29:12 EDT (Thu, 26 Aug 2010)
New Revision: 65015
URL: http://svn.boost.org/trac/boost/changeset/65015

Log:
Added workaround for Intel compiler, which has sporadic issues with fpclassify on Linux.
Fixes #4592.
Text files modified:
   trunk/boost/math/special_functions/detail/fp_traits.hpp | 3 ++-
   trunk/boost/math/special_functions/fpclassify.hpp | 4 ++--
   2 files changed, 4 insertions(+), 3 deletions(-)

Modified: trunk/boost/math/special_functions/detail/fp_traits.hpp
==============================================================================
--- trunk/boost/math/special_functions/detail/fp_traits.hpp (original)
+++ trunk/boost/math/special_functions/detail/fp_traits.hpp 2010-08-26 08:29:12 EDT (Thu, 26 Aug 2010)
@@ -545,7 +545,8 @@
    && !defined(__hpux) \
    && !defined(__DECCXX)\
    && !defined(__osf__) \
- && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)
+ && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)\
+ && !defined(BOOST_MATH_DISABLE_STD_FPCLASSIFY)
 # define BOOST_MATH_USE_STD_FPCLASSIFY
 #endif
 

Modified: trunk/boost/math/special_functions/fpclassify.hpp
==============================================================================
--- trunk/boost/math/special_functions/fpclassify.hpp (original)
+++ trunk/boost/math/special_functions/fpclassify.hpp 2010-08-26 08:29:12 EDT (Thu, 26 Aug 2010)
@@ -87,7 +87,7 @@
 
 namespace boost{
 
-#if defined(BOOST_HAS_FPCLASSIFY) || defined(isnan)
+#if (defined(BOOST_HAS_FPCLASSIFY) || defined(isnan)) && !defined(BOOST_MATH_DISABLE_STD_FPCLASSIFY)
 //
 // This must not be located in any namespace under boost::math
 // otherwise we can get into an infinite loop if isnan is
@@ -133,7 +133,7 @@
    BOOST_MATH_INSTRUMENT_VARIABLE(t);
 
    // whenever possible check for Nan's first:
-#ifdef BOOST_HAS_FPCLASSIFY
+#if defined(BOOST_HAS_FPCLASSIFY) && !defined(BOOST_MATH_DISABLE_STD_FPCLASSIFY)
    if(::boost::math_detail::is_nan_helper(t, ::boost::is_floating_point<T>()))
       return FP_NAN;
 #elif defined(isnan)


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