Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r74389 - in trunk/boost/math: bindings special_functions special_functions/detail
From: john_at_[hidden]
Date: 2011-09-15 13:16:21


Author: johnmaddock
Date: 2011-09-15 13:16:20 EDT (Thu, 15 Sep 2011)
New Revision: 74389
URL: http://svn.boost.org/trac/boost/changeset/74389

Log:
Fix mpreal #includes.
Add some more expression-template fixes.
Add fix for Cray platform in SSE2 support selection.
Text files modified:
   trunk/boost/math/bindings/mpreal.hpp | 4 +++-
   trunk/boost/math/special_functions/detail/lgamma_small.hpp | 2 +-
   trunk/boost/math/special_functions/detail/t_distribution_inv.hpp | 2 +-
   trunk/boost/math/special_functions/gamma.hpp | 4 ++--
   trunk/boost/math/special_functions/lanczos.hpp | 2 +-
   5 files changed, 8 insertions(+), 6 deletions(-)

Modified: trunk/boost/math/bindings/mpreal.hpp
==============================================================================
--- trunk/boost/math/bindings/mpreal.hpp (original)
+++ trunk/boost/math/bindings/mpreal.hpp 2011-09-15 13:16:20 EDT (Thu, 15 Sep 2011)
@@ -12,6 +12,7 @@
 #define BOOST_MATH_MPREAL_BINDINGS_HPP
 
 #include <boost/config.hpp>
+#include <boost/lexical_cast.hpp>
 
 #ifdef BOOST_MSVC
 //
@@ -889,8 +890,9 @@
 }
 
 } // namespace detail
+} // namespace math
 
-}}
+}
 
 #endif // BOOST_MATH_MPLFR_BINDINGS_HPP
 

Modified: trunk/boost/math/special_functions/detail/lgamma_small.hpp
==============================================================================
--- trunk/boost/math/special_functions/detail/lgamma_small.hpp (original)
+++ trunk/boost/math/special_functions/detail/lgamma_small.hpp 2011-09-15 13:16:20 EDT (Thu, 15 Sep 2011)
@@ -197,7 +197,7 @@
             static_cast<T>(-0.827193521891290553639e-6L)
          };
          T r = zm2 * zm1;
- T R = tools::evaluate_polynomial(P, -zm2) / tools::evaluate_polynomial(Q, -zm2);
+ T R = tools::evaluate_polynomial(P, T(-zm2)) / tools::evaluate_polynomial(Q, T(-zm2));
 
          result += r * Y + r * R;
       }

Modified: trunk/boost/math/special_functions/detail/t_distribution_inv.hpp
==============================================================================
--- trunk/boost/math/special_functions/detail/t_distribution_inv.hpp (original)
+++ trunk/boost/math/special_functions/detail/t_distribution_inv.hpp 2011-09-15 13:16:20 EDT (Thu, 15 Sep 2011)
@@ -460,7 +460,7 @@
    // Get an estimate of the result:
    //
    bool exact;
- T t = inverse_students_t(df, p, 1-p, pol, &exact);
+ T t = inverse_students_t(df, p, T(1-p), pol, &exact);
    if((t == 0) || exact)
       return invert ? -t : t; // can't do better!
    //

Modified: trunk/boost/math/special_functions/gamma.hpp
==============================================================================
--- trunk/boost/math/special_functions/gamma.hpp (original)
+++ trunk/boost/math/special_functions/gamma.hpp 2011-09-15 13:16:20 EDT (Thu, 15 Sep 2011)
@@ -264,7 +264,7 @@
>,
             mpl::int_<113>, mpl::int_<0> >::type
>::type tag_type;
- result = lgamma_small_imp<T>(z, z - 1, z - 2, tag_type(), pol, l);
+ result = lgamma_small_imp<T>(z, T(z - 1), T(z - 2), tag_type(), pol, l);
    }
    else if((z >= 3) && (z < 100))
    {
@@ -1107,7 +1107,7 @@
       result = pow(zgh / (zgh + delta), z - constants::half<T>());
    }
    result *= pow(constants::e<T>() / (zgh + delta), delta);
- result *= L::lanczos_sum(z) / L::lanczos_sum(z + delta);
+ result *= L::lanczos_sum(z) / L::lanczos_sum(T(z + delta));
    return result;
 }
 //

Modified: trunk/boost/math/special_functions/lanczos.hpp
==============================================================================
--- trunk/boost/math/special_functions/lanczos.hpp (original)
+++ trunk/boost/math/special_functions/lanczos.hpp 2011-09-15 13:16:20 EDT (Thu, 15 Sep 2011)
@@ -1229,7 +1229,7 @@
 } // namespace math
 } // namespace boost
 
-#if !defined(__GNUC__) || (__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ > 3))
+#if !defined(_CRAYC) && (!defined(__GNUC__) || (__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ > 3)))
 #if (defined(_M_IX86_FP) && (_M_IX86_FP >= 2)) || defined(__SSE2__)
 #include <boost/math/special_functions/detail/lanczos_sse2.hpp>
 #endif


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