summaryrefslogtreecommitdiff
path: root/src/third_party/boost-1.56.0/boost/math/tools
diff options
context:
space:
mode:
authorMark Benvenuto <mark.benvenuto@mongodb.com>2014-08-15 17:06:16 -0400
committerMark Benvenuto <mark.benvenuto@mongodb.com>2014-08-15 17:20:20 -0400
commit0d1d5016b57c59817fa0619e5cf4c6df046b28c3 (patch)
treeeae9fc8b180f49dd5e3834f7238c9c9cad93cfd9 /src/third_party/boost-1.56.0/boost/math/tools
parent492d97468b1121228f208489a645759b390f023e (diff)
downloadmongo-0d1d5016b57c59817fa0619e5cf4c6df046b28c3.tar.gz
SERVER-8994: Boost 1.56.0
Initial import of source Libraries: algorithm array asio bind chrono config container date_time filesystem function integer intrusive noncopyable optional program_options random smart_ptr static_assert thread unordered utility
Diffstat (limited to 'src/third_party/boost-1.56.0/boost/math/tools')
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/big_constant.hpp68
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/config.hpp397
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_10.hpp84
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_11.hpp90
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_12.hpp96
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_13.hpp102
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_14.hpp108
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_15.hpp114
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_16.hpp120
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_17.hpp126
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_18.hpp132
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_19.hpp138
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_2.hpp36
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_20.hpp144
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_3.hpp42
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_4.hpp48
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_5.hpp54
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_6.hpp60
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_7.hpp66
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_8.hpp72
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_9.hpp78
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_10.hpp90
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_11.hpp97
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_12.hpp104
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_13.hpp111
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_14.hpp118
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_15.hpp125
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_16.hpp132
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_17.hpp139
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_18.hpp146
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_19.hpp153
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_2.hpp48
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_20.hpp160
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_3.hpp48
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_4.hpp48
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_5.hpp55
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_6.hpp62
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_7.hpp69
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_8.hpp76
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_9.hpp83
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_10.hpp156
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_11.hpp181
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_12.hpp208
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_13.hpp237
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_14.hpp268
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_15.hpp301
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_16.hpp336
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_17.hpp373
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_18.hpp412
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_19.hpp453
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_2.hpp48
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_20.hpp496
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_3.hpp48
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_4.hpp48
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_5.hpp61
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_6.hpp76
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_7.hpp93
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_8.hpp112
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_9.hpp133
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_10.hpp138
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_11.hpp150
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_12.hpp162
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_13.hpp174
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_14.hpp186
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_15.hpp198
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_16.hpp210
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_17.hpp222
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_18.hpp234
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_19.hpp246
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_2.hpp42
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_20.hpp258
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_3.hpp54
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_4.hpp66
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_5.hpp78
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_6.hpp90
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_7.hpp102
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_8.hpp114
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_9.hpp126
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_10.hpp144
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_11.hpp160
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_12.hpp176
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_13.hpp192
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_14.hpp208
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_15.hpp224
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_16.hpp240
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_17.hpp256
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_18.hpp272
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_19.hpp288
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_2.hpp48
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_20.hpp304
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_3.hpp48
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_4.hpp48
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_5.hpp64
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_6.hpp80
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_7.hpp96
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_8.hpp112
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_9.hpp128
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_10.hpp396
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_11.hpp482
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_12.hpp576
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_13.hpp678
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_14.hpp788
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_15.hpp906
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_16.hpp1032
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_17.hpp1166
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_18.hpp1308
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_19.hpp1458
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_2.hpp48
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_20.hpp1616
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_3.hpp48
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_4.hpp48
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_5.hpp86
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_6.hpp132
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_7.hpp186
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_8.hpp248
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_9.hpp318
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/fraction.hpp252
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/precision.hpp382
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/promotion.hpp175
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/rational.hpp333
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/real_cast.hpp29
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/roots.hpp542
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/series.hpp158
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/toms748_solve.hpp585
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/tuple.hpp90
-rw-r--r--src/third_party/boost-1.56.0/boost/math/tools/user.hpp105
126 files changed, 28188 insertions, 0 deletions
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/big_constant.hpp b/src/third_party/boost-1.56.0/boost/math/tools/big_constant.hpp
new file mode 100644
index 00000000000..423cc1b6316
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/big_constant.hpp
@@ -0,0 +1,68 @@
+
+// Copyright (c) 2011 John Maddock
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_MATH_TOOLS_BIG_CONSTANT_HPP
+#define BOOST_MATH_TOOLS_BIG_CONSTANT_HPP
+
+#include <boost/math/tools/config.hpp>
+#ifndef BOOST_MATH_NO_LEXICAL_CAST
+#include <boost/lexical_cast.hpp>
+#endif
+#include <boost/type_traits/is_convertible.hpp>
+#include <boost/math/cstdfloat/cstdfloat_types.hpp>
+
+namespace boost{ namespace math{
+
+namespace tools{
+
+template <class T>
+inline BOOST_CONSTEXPR_OR_CONST T make_big_value(boost::floatmax_t v, const char*, mpl::true_ const&, mpl::false_ const&)
+{
+ return static_cast<T>(v);
+}
+template <class T>
+inline BOOST_CONSTEXPR_OR_CONST T make_big_value(boost::floatmax_t v, const char*, mpl::true_ const&, mpl::true_ const&)
+{
+ return static_cast<T>(v);
+}
+#ifndef BOOST_MATH_NO_LEXICAL_CAST
+template <class T>
+inline T make_big_value(boost::floatmax_t, const char* s, mpl::false_ const&, mpl::false_ const&)
+{
+ return boost::lexical_cast<T>(s);
+}
+#endif
+template <class T>
+inline BOOST_CONSTEXPR const char* make_big_value(boost::floatmax_t, const char* s, mpl::false_ const&, mpl::true_ const&)
+{
+ return s;
+}
+
+//
+// For constants which might fit in a long double (if it's big enough):
+//
+#define BOOST_MATH_BIG_CONSTANT(T, D, x)\
+ boost::math::tools::make_big_value<T>(\
+ BOOST_FLOATMAX_C(x), \
+ BOOST_STRINGIZE(x), \
+ mpl::bool_< (is_convertible<boost::floatmax_t, T>::value) && \
+ ((D <= std::numeric_limits<boost::floatmax_t>::digits) \
+ || is_floating_point<T>::value \
+ || (std::numeric_limits<T>::is_specialized && \
+ (std::numeric_limits<T>::digits10 <= std::numeric_limits<boost::floatmax_t>::digits10))) >(), \
+ boost::is_convertible<const char*, T>())
+//
+// For constants too huge for any conceivable long double (and which generate compiler errors if we try and declare them as such):
+//
+#define BOOST_MATH_HUGE_CONSTANT(T, D, x)\
+ boost::math::tools::make_big_value<T>(0.0L, BOOST_STRINGIZE(x), \
+ mpl::bool_<is_floating_point<T>::value || (std::numeric_limits<T>::is_specialized && std::numeric_limits<T>::max_exponent <= std::numeric_limits<long double>::max_exponent && std::numeric_limits<T>::digits <= std::numeric_limits<long double>::digits)>(), \
+ boost::is_convertible<const char*, T>())
+
+}}} // namespaces
+
+#endif
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/config.hpp b/src/third_party/boost-1.56.0/boost/math/tools/config.hpp
new file mode 100644
index 00000000000..4ec5768aafb
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/config.hpp
@@ -0,0 +1,397 @@
+// Copyright (c) 2006-7 John Maddock
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_MATH_TOOLS_CONFIG_HPP
+#define BOOST_MATH_TOOLS_CONFIG_HPP
+
+#ifdef _MSC_VER
+#pragma once
+#endif
+
+#include <boost/config.hpp>
+#include <boost/cstdint.hpp> // for boost::uintmax_t
+#include <boost/detail/workaround.hpp>
+#include <boost/type_traits/is_integral.hpp>
+#include <algorithm> // for min and max
+#include <boost/config/no_tr1/cmath.hpp>
+#include <climits>
+#include <cfloat>
+#if (defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__))
+# include <math.h>
+#endif
+#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+# include <limits>
+#endif
+
+#include <boost/math/tools/user.hpp>
+
+#if (defined(__CYGWIN__) || defined(__FreeBSD__) || defined(__NetBSD__) \
+ || (defined(__hppa) && !defined(__OpenBSD__)) || (defined(__NO_LONG_DOUBLE_MATH) && (DBL_MANT_DIG != LDBL_MANT_DIG))) \
+ && !defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS)
+# define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+#endif
+#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
+//
+// Borland post 5.8.2 uses Dinkumware's std C lib which
+// doesn't have true long double precision. Earlier
+// versions are problematic too:
+//
+# define BOOST_MATH_NO_REAL_CONCEPT_TESTS
+# define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+# define BOOST_MATH_CONTROL_FP _control87(MCW_EM,MCW_EM)
+# include <float.h>
+#endif
+#ifdef __IBMCPP__
+//
+// For reasons I don't unserstand, the tests with IMB's compiler all
+// pass at long double precision, but fail with real_concept, those tests
+// are disabled for now. (JM 2012).
+# define BOOST_MATH_NO_REAL_CONCEPT_TESTS
+#endif
+#if (defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)) && ((LDBL_MANT_DIG == 106) || (__LDBL_MANT_DIG__ == 106)) && !defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS)
+//
+// Darwin's rather strange "double double" is rather hard to
+// support, it should be possible given enough effort though...
+//
+# define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+#endif
+#if defined(unix) && defined(__INTEL_COMPILER) && (__INTEL_COMPILER <= 1000) && !defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS)
+//
+// Intel compiler prior to version 10 has sporadic problems
+// calling the long double overloads of the std lib math functions:
+// calling ::powl is OK, but std::pow(long double, long double)
+// may segfault depending upon the value of the arguments passed
+// and the specific Linux distribution.
+//
+// We'll be conservative and disable long double support for this compiler.
+//
+// Comment out this #define and try building the tests to determine whether
+// your Intel compiler version has this issue or not.
+//
+# define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+#endif
+#if defined(unix) && defined(__INTEL_COMPILER)
+//
+// Intel compiler has sporadic issues compiling std::fpclassify depending on
+// the exact OS version used. Use our own code for this as we know it works
+// well on Intel processors:
+//
+#define BOOST_MATH_DISABLE_STD_FPCLASSIFY
+#endif
+
+#if defined(BOOST_MSVC) && !defined(_WIN32_WCE)
+ // Better safe than sorry, our tests don't support hardware exceptions:
+# define BOOST_MATH_CONTROL_FP _control87(MCW_EM,MCW_EM)
+#endif
+
+#ifdef __IBMCPP__
+# define BOOST_MATH_NO_DEDUCED_FUNCTION_POINTERS
+#endif
+
+#if (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901))
+# define BOOST_MATH_USE_C99
+#endif
+
+#if (defined(__hpux) && !defined(__hppa))
+# define BOOST_MATH_USE_C99
+#endif
+
+#if defined(__GNUC__) && defined(_GLIBCXX_USE_C99)
+# define BOOST_MATH_USE_C99
+#endif
+
+#if defined(_LIBCPP_VERSION) && !defined(_MSC_VER)
+# define BOOST_MATH_USE_C99
+#endif
+
+#if defined(__CYGWIN__) || defined(__HP_aCC) || defined(BOOST_INTEL) \
+ || defined(BOOST_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY) \
+ || (defined(__GNUC__) && !defined(BOOST_MATH_USE_C99))\
+ || defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS)
+# define BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY
+#endif
+
+#if BOOST_WORKAROUND(__SUNPRO_CC, <= 0x590)
+
+# include "boost/type.hpp"
+# include "boost/non_type.hpp"
+
+# define BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(t) boost::type<t>* = 0
+# define BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(t) boost::type<t>*
+# define BOOST_MATH_EXPLICIT_TEMPLATE_NON_TYPE(t, v) boost::non_type<t, v>* = 0
+# define BOOST_MATH_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) boost::non_type<t, v>*
+
+# define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(t) \
+ , BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(t)
+# define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(t) \
+ , BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(t)
+# define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(t, v) \
+ , BOOST_MATH_EXPLICIT_TEMPLATE_NON_TYPE(t, v)
+# define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) \
+ , BOOST_MATH_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)
+
+#else
+
+// no workaround needed: expand to nothing
+
+# define BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(t)
+# define BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(t)
+# define BOOST_MATH_EXPLICIT_TEMPLATE_NON_TYPE(t, v)
+# define BOOST_MATH_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)
+
+# define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(t)
+# define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(t)
+# define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(t, v)
+# define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)
+
+
+#endif // __SUNPRO_CC
+
+#if (defined(__SUNPRO_CC) || defined(__hppa) || defined(__GNUC__)) && !defined(BOOST_MATH_SMALL_CONSTANT)
+// Sun's compiler emits a hard error if a constant underflows,
+// as does aCC on PA-RISC, while gcc issues a large number of warnings:
+# define BOOST_MATH_SMALL_CONSTANT(x) 0.0
+#else
+# define BOOST_MATH_SMALL_CONSTANT(x) x
+#endif
+
+
+#if BOOST_WORKAROUND(BOOST_MSVC, < 1400)
+//
+// Define if constants too large for a float cause "bad"
+// values to be stored in the data, rather than infinity
+// or a suitably large value.
+//
+# define BOOST_MATH_BUGGY_LARGE_FLOAT_CONSTANTS
+#endif
+//
+// Tune performance options for specific compilers:
+//
+#ifdef BOOST_MSVC
+# define BOOST_MATH_POLY_METHOD 2
+#elif defined(BOOST_INTEL)
+# define BOOST_MATH_POLY_METHOD 2
+# define BOOST_MATH_RATIONAL_METHOD 2
+#elif defined(__GNUC__)
+# define BOOST_MATH_POLY_METHOD 3
+# define BOOST_MATH_RATIONAL_METHOD 3
+# define BOOST_MATH_INT_TABLE_TYPE(RT, IT) RT
+# define BOOST_MATH_INT_VALUE_SUFFIX(RV, SUF) RV##.0L
+#endif
+
+#if defined(BOOST_NO_LONG_LONG) && !defined(BOOST_MATH_INT_TABLE_TYPE)
+# define BOOST_MATH_INT_TABLE_TYPE(RT, IT) RT
+# define BOOST_MATH_INT_VALUE_SUFFIX(RV, SUF) RV##.0L
+#endif
+
+//
+// The maximum order of polynomial that will be evaluated
+// via an unrolled specialisation:
+//
+#ifndef BOOST_MATH_MAX_POLY_ORDER
+# define BOOST_MATH_MAX_POLY_ORDER 17
+#endif
+//
+// Set the method used to evaluate polynomials and rationals:
+//
+#ifndef BOOST_MATH_POLY_METHOD
+# define BOOST_MATH_POLY_METHOD 1
+#endif
+#ifndef BOOST_MATH_RATIONAL_METHOD
+# define BOOST_MATH_RATIONAL_METHOD 0
+#endif
+//
+// decide whether to store constants as integers or reals:
+//
+#ifndef BOOST_MATH_INT_TABLE_TYPE
+# define BOOST_MATH_INT_TABLE_TYPE(RT, IT) IT
+#endif
+#ifndef BOOST_MATH_INT_VALUE_SUFFIX
+# define BOOST_MATH_INT_VALUE_SUFFIX(RV, SUF) RV##SUF
+#endif
+//
+// Test whether to support __float128:
+//
+#if defined(_GLIBCXX_USE_FLOAT128) && defined(BOOST_GCC) && !defined(__STRICT_ANSI__) \
+ && !defined(BOOST_MATH_DISABLE_FLOAT128) || defined(BOOST_MATH_USE_FLOAT128)
+//
+// Only enable this when the compiler really is GCC as clang and probably
+// intel too don't support __float128 yet :-(
+//
+#ifndef BOOST_MATH_USE_FLOAT128
+# define BOOST_MATH_USE_FLOAT128
+#endif
+
+# if defined(BOOST_INTEL) && defined(BOOST_INTEL_CXX_VERSION) && (BOOST_INTEL_CXX_VERSION >= 1310) && defined(__GNUC__)
+# if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6))
+# define BOOST_MATH_FLOAT128_TYPE __float128
+# endif
+# elif defined(__GNUC__)
+# define BOOST_MATH_FLOAT128_TYPE __float128
+# endif
+
+# ifndef BOOST_MATH_FLOAT128_TYPE
+# define BOOST_MATH_FLOAT128_TYPE _Quad
+# endif
+#endif
+//
+// Check for WinCE with no iostream support:
+//
+#if defined(_WIN32_WCE) && !defined(__SGI_STL_PORT)
+# define BOOST_MATH_NO_LEXICAL_CAST
+#endif
+
+//
+// Helper macro for controlling the FP behaviour:
+//
+#ifndef BOOST_MATH_CONTROL_FP
+# define BOOST_MATH_CONTROL_FP
+#endif
+//
+// Helper macro for using statements:
+//
+#define BOOST_MATH_STD_USING_CORE \
+ using std::abs;\
+ using std::acos;\
+ using std::cos;\
+ using std::fmod;\
+ using std::modf;\
+ using std::tan;\
+ using std::asin;\
+ using std::cosh;\
+ using std::frexp;\
+ using std::pow;\
+ using std::tanh;\
+ using std::atan;\
+ using std::exp;\
+ using std::ldexp;\
+ using std::sin;\
+ using std::atan2;\
+ using std::fabs;\
+ using std::log;\
+ using std::sinh;\
+ using std::ceil;\
+ using std::floor;\
+ using std::log10;\
+ using std::sqrt;
+
+#define BOOST_MATH_STD_USING BOOST_MATH_STD_USING_CORE
+
+namespace boost{ namespace math{
+namespace tools
+{
+
+template <class T>
+inline T max BOOST_PREVENT_MACRO_SUBSTITUTION(T a, T b, T c)
+{
+ return (std::max)((std::max)(a, b), c);
+}
+
+template <class T>
+inline T max BOOST_PREVENT_MACRO_SUBSTITUTION(T a, T b, T c, T d)
+{
+ return (std::max)((std::max)(a, b), (std::max)(c, d));
+}
+
+} // namespace tools
+
+template <class T>
+void suppress_unused_variable_warning(const T&)
+{
+}
+
+namespace detail{
+
+template <class T>
+struct is_integer_for_rounding
+{
+ static const bool value = boost::is_integral<T>::value
+#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+ || (std::numeric_limits<T>::is_specialized && std::numeric_limits<T>::is_integer)
+#endif
+ ;
+};
+
+}
+
+}} // namespace boost namespace math
+
+#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>
+
+# ifdef FE_ALL_EXCEPT
+
+namespace boost{ namespace math{
+ namespace detail
+ {
+ struct fpu_guard
+ {
+ fpu_guard()
+ {
+ fegetexceptflag(&m_flags, FE_ALL_EXCEPT);
+ feclearexcept(FE_ALL_EXCEPT);
+ }
+ ~fpu_guard()
+ {
+ fesetexceptflag(&m_flags, FE_ALL_EXCEPT);
+ }
+ private:
+ fexcept_t m_flags;
+ };
+
+ } // namespace detail
+ }} // namespaces
+
+# define BOOST_FPU_EXCEPTION_GUARD boost::math::detail::fpu_guard local_guard_object;
+# define BOOST_MATH_INSTRUMENT_FPU do{ fexcept_t cpu_flags; fegetexceptflag(&cpu_flags, FE_ALL_EXCEPT); BOOST_MATH_INSTRUMENT_VARIABLE(cpu_flags); } while(0);
+
+# else
+
+# define BOOST_FPU_EXCEPTION_GUARD
+# define BOOST_MATH_INSTRUMENT_FPU
+
+# endif
+
+#else // All other platforms.
+# define BOOST_FPU_EXCEPTION_GUARD
+# define BOOST_MATH_INSTRUMENT_FPU
+#endif
+
+#ifdef BOOST_MATH_INSTRUMENT
+
+# include <iostream>
+# include <iomanip>
+# include <typeinfo>
+
+# define BOOST_MATH_INSTRUMENT_CODE(x) \
+ std::cout << std::setprecision(35) << __FILE__ << ":" << __LINE__ << " " << x << std::endl;
+# define BOOST_MATH_INSTRUMENT_VARIABLE(name) BOOST_MATH_INSTRUMENT_CODE(BOOST_STRINGIZE(name) << " = " << name)
+
+#else
+
+# define BOOST_MATH_INSTRUMENT_CODE(x)
+# define BOOST_MATH_INSTRUMENT_VARIABLE(name)
+
+#endif
+
+#endif // BOOST_MATH_TOOLS_CONFIG_HPP
+
+
+
+
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_10.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_10.hpp
new file mode 100644
index 00000000000..b13d6a38879
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_10.hpp
@@ -0,0 +1,84 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_EVAL_10_HPP
+#define BOOST_MATH_TOOLS_POLY_EVAL_10_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>(a[1] * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>((a[2] * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>(((a[3] * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<5>*)
+{
+ return static_cast<V>((((a[4] * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<6>*)
+{
+ return static_cast<V>(((((a[5] * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<7>*)
+{
+ return static_cast<V>((((((a[6] * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<8>*)
+{
+ return static_cast<V>(((((((a[7] * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<9>*)
+{
+ return static_cast<V>((((((((a[8] * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<10>*)
+{
+ return static_cast<V>(((((((((a[9] * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_11.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_11.hpp
new file mode 100644
index 00000000000..f0cf67e959b
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_11.hpp
@@ -0,0 +1,90 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_EVAL_11_HPP
+#define BOOST_MATH_TOOLS_POLY_EVAL_11_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>(a[1] * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>((a[2] * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>(((a[3] * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<5>*)
+{
+ return static_cast<V>((((a[4] * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<6>*)
+{
+ return static_cast<V>(((((a[5] * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<7>*)
+{
+ return static_cast<V>((((((a[6] * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<8>*)
+{
+ return static_cast<V>(((((((a[7] * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<9>*)
+{
+ return static_cast<V>((((((((a[8] * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<10>*)
+{
+ return static_cast<V>(((((((((a[9] * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<11>*)
+{
+ return static_cast<V>((((((((((a[10] * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_12.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_12.hpp
new file mode 100644
index 00000000000..03b974cecad
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_12.hpp
@@ -0,0 +1,96 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_EVAL_12_HPP
+#define BOOST_MATH_TOOLS_POLY_EVAL_12_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>(a[1] * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>((a[2] * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>(((a[3] * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<5>*)
+{
+ return static_cast<V>((((a[4] * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<6>*)
+{
+ return static_cast<V>(((((a[5] * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<7>*)
+{
+ return static_cast<V>((((((a[6] * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<8>*)
+{
+ return static_cast<V>(((((((a[7] * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<9>*)
+{
+ return static_cast<V>((((((((a[8] * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<10>*)
+{
+ return static_cast<V>(((((((((a[9] * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<11>*)
+{
+ return static_cast<V>((((((((((a[10] * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<12>*)
+{
+ return static_cast<V>(((((((((((a[11] * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_13.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_13.hpp
new file mode 100644
index 00000000000..b947f542c30
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_13.hpp
@@ -0,0 +1,102 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_EVAL_13_HPP
+#define BOOST_MATH_TOOLS_POLY_EVAL_13_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>(a[1] * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>((a[2] * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>(((a[3] * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<5>*)
+{
+ return static_cast<V>((((a[4] * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<6>*)
+{
+ return static_cast<V>(((((a[5] * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<7>*)
+{
+ return static_cast<V>((((((a[6] * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<8>*)
+{
+ return static_cast<V>(((((((a[7] * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<9>*)
+{
+ return static_cast<V>((((((((a[8] * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<10>*)
+{
+ return static_cast<V>(((((((((a[9] * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<11>*)
+{
+ return static_cast<V>((((((((((a[10] * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<12>*)
+{
+ return static_cast<V>(((((((((((a[11] * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<13>*)
+{
+ return static_cast<V>((((((((((((a[12] * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_14.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_14.hpp
new file mode 100644
index 00000000000..8374e389040
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_14.hpp
@@ -0,0 +1,108 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_EVAL_14_HPP
+#define BOOST_MATH_TOOLS_POLY_EVAL_14_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>(a[1] * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>((a[2] * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>(((a[3] * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<5>*)
+{
+ return static_cast<V>((((a[4] * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<6>*)
+{
+ return static_cast<V>(((((a[5] * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<7>*)
+{
+ return static_cast<V>((((((a[6] * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<8>*)
+{
+ return static_cast<V>(((((((a[7] * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<9>*)
+{
+ return static_cast<V>((((((((a[8] * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<10>*)
+{
+ return static_cast<V>(((((((((a[9] * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<11>*)
+{
+ return static_cast<V>((((((((((a[10] * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<12>*)
+{
+ return static_cast<V>(((((((((((a[11] * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<13>*)
+{
+ return static_cast<V>((((((((((((a[12] * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<14>*)
+{
+ return static_cast<V>(((((((((((((a[13] * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_15.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_15.hpp
new file mode 100644
index 00000000000..ebfa4636014
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_15.hpp
@@ -0,0 +1,114 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_EVAL_15_HPP
+#define BOOST_MATH_TOOLS_POLY_EVAL_15_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>(a[1] * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>((a[2] * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>(((a[3] * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<5>*)
+{
+ return static_cast<V>((((a[4] * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<6>*)
+{
+ return static_cast<V>(((((a[5] * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<7>*)
+{
+ return static_cast<V>((((((a[6] * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<8>*)
+{
+ return static_cast<V>(((((((a[7] * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<9>*)
+{
+ return static_cast<V>((((((((a[8] * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<10>*)
+{
+ return static_cast<V>(((((((((a[9] * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<11>*)
+{
+ return static_cast<V>((((((((((a[10] * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<12>*)
+{
+ return static_cast<V>(((((((((((a[11] * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<13>*)
+{
+ return static_cast<V>((((((((((((a[12] * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<14>*)
+{
+ return static_cast<V>(((((((((((((a[13] * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<15>*)
+{
+ return static_cast<V>((((((((((((((a[14] * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_16.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_16.hpp
new file mode 100644
index 00000000000..60eb4dc675c
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_16.hpp
@@ -0,0 +1,120 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_EVAL_16_HPP
+#define BOOST_MATH_TOOLS_POLY_EVAL_16_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>(a[1] * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>((a[2] * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>(((a[3] * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<5>*)
+{
+ return static_cast<V>((((a[4] * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<6>*)
+{
+ return static_cast<V>(((((a[5] * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<7>*)
+{
+ return static_cast<V>((((((a[6] * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<8>*)
+{
+ return static_cast<V>(((((((a[7] * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<9>*)
+{
+ return static_cast<V>((((((((a[8] * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<10>*)
+{
+ return static_cast<V>(((((((((a[9] * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<11>*)
+{
+ return static_cast<V>((((((((((a[10] * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<12>*)
+{
+ return static_cast<V>(((((((((((a[11] * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<13>*)
+{
+ return static_cast<V>((((((((((((a[12] * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<14>*)
+{
+ return static_cast<V>(((((((((((((a[13] * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<15>*)
+{
+ return static_cast<V>((((((((((((((a[14] * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<16>*)
+{
+ return static_cast<V>(((((((((((((((a[15] * x + a[14]) * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_17.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_17.hpp
new file mode 100644
index 00000000000..6233f1b07b9
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_17.hpp
@@ -0,0 +1,126 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_EVAL_17_HPP
+#define BOOST_MATH_TOOLS_POLY_EVAL_17_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>(a[1] * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>((a[2] * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>(((a[3] * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<5>*)
+{
+ return static_cast<V>((((a[4] * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<6>*)
+{
+ return static_cast<V>(((((a[5] * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<7>*)
+{
+ return static_cast<V>((((((a[6] * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<8>*)
+{
+ return static_cast<V>(((((((a[7] * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<9>*)
+{
+ return static_cast<V>((((((((a[8] * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<10>*)
+{
+ return static_cast<V>(((((((((a[9] * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<11>*)
+{
+ return static_cast<V>((((((((((a[10] * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<12>*)
+{
+ return static_cast<V>(((((((((((a[11] * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<13>*)
+{
+ return static_cast<V>((((((((((((a[12] * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<14>*)
+{
+ return static_cast<V>(((((((((((((a[13] * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<15>*)
+{
+ return static_cast<V>((((((((((((((a[14] * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<16>*)
+{
+ return static_cast<V>(((((((((((((((a[15] * x + a[14]) * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<17>*)
+{
+ return static_cast<V>((((((((((((((((a[16] * x + a[15]) * x + a[14]) * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_18.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_18.hpp
new file mode 100644
index 00000000000..2a06def44b9
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_18.hpp
@@ -0,0 +1,132 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_EVAL_18_HPP
+#define BOOST_MATH_TOOLS_POLY_EVAL_18_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>(a[1] * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>((a[2] * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>(((a[3] * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<5>*)
+{
+ return static_cast<V>((((a[4] * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<6>*)
+{
+ return static_cast<V>(((((a[5] * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<7>*)
+{
+ return static_cast<V>((((((a[6] * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<8>*)
+{
+ return static_cast<V>(((((((a[7] * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<9>*)
+{
+ return static_cast<V>((((((((a[8] * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<10>*)
+{
+ return static_cast<V>(((((((((a[9] * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<11>*)
+{
+ return static_cast<V>((((((((((a[10] * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<12>*)
+{
+ return static_cast<V>(((((((((((a[11] * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<13>*)
+{
+ return static_cast<V>((((((((((((a[12] * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<14>*)
+{
+ return static_cast<V>(((((((((((((a[13] * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<15>*)
+{
+ return static_cast<V>((((((((((((((a[14] * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<16>*)
+{
+ return static_cast<V>(((((((((((((((a[15] * x + a[14]) * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<17>*)
+{
+ return static_cast<V>((((((((((((((((a[16] * x + a[15]) * x + a[14]) * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<18>*)
+{
+ return static_cast<V>(((((((((((((((((a[17] * x + a[16]) * x + a[15]) * x + a[14]) * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_19.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_19.hpp
new file mode 100644
index 00000000000..8f0da8b219f
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_19.hpp
@@ -0,0 +1,138 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_EVAL_19_HPP
+#define BOOST_MATH_TOOLS_POLY_EVAL_19_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>(a[1] * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>((a[2] * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>(((a[3] * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<5>*)
+{
+ return static_cast<V>((((a[4] * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<6>*)
+{
+ return static_cast<V>(((((a[5] * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<7>*)
+{
+ return static_cast<V>((((((a[6] * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<8>*)
+{
+ return static_cast<V>(((((((a[7] * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<9>*)
+{
+ return static_cast<V>((((((((a[8] * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<10>*)
+{
+ return static_cast<V>(((((((((a[9] * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<11>*)
+{
+ return static_cast<V>((((((((((a[10] * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<12>*)
+{
+ return static_cast<V>(((((((((((a[11] * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<13>*)
+{
+ return static_cast<V>((((((((((((a[12] * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<14>*)
+{
+ return static_cast<V>(((((((((((((a[13] * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<15>*)
+{
+ return static_cast<V>((((((((((((((a[14] * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<16>*)
+{
+ return static_cast<V>(((((((((((((((a[15] * x + a[14]) * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<17>*)
+{
+ return static_cast<V>((((((((((((((((a[16] * x + a[15]) * x + a[14]) * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<18>*)
+{
+ return static_cast<V>(((((((((((((((((a[17] * x + a[16]) * x + a[15]) * x + a[14]) * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<19>*)
+{
+ return static_cast<V>((((((((((((((((((a[18] * x + a[17]) * x + a[16]) * x + a[15]) * x + a[14]) * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_2.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_2.hpp
new file mode 100644
index 00000000000..a0b10d5ee5e
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_2.hpp
@@ -0,0 +1,36 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_EVAL_2_HPP
+#define BOOST_MATH_TOOLS_POLY_EVAL_2_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>(a[1] * x + a[0]);
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_20.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_20.hpp
new file mode 100644
index 00000000000..d1a886dd761
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_20.hpp
@@ -0,0 +1,144 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_EVAL_20_HPP
+#define BOOST_MATH_TOOLS_POLY_EVAL_20_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>(a[1] * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>((a[2] * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>(((a[3] * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<5>*)
+{
+ return static_cast<V>((((a[4] * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<6>*)
+{
+ return static_cast<V>(((((a[5] * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<7>*)
+{
+ return static_cast<V>((((((a[6] * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<8>*)
+{
+ return static_cast<V>(((((((a[7] * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<9>*)
+{
+ return static_cast<V>((((((((a[8] * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<10>*)
+{
+ return static_cast<V>(((((((((a[9] * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<11>*)
+{
+ return static_cast<V>((((((((((a[10] * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<12>*)
+{
+ return static_cast<V>(((((((((((a[11] * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<13>*)
+{
+ return static_cast<V>((((((((((((a[12] * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<14>*)
+{
+ return static_cast<V>(((((((((((((a[13] * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<15>*)
+{
+ return static_cast<V>((((((((((((((a[14] * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<16>*)
+{
+ return static_cast<V>(((((((((((((((a[15] * x + a[14]) * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<17>*)
+{
+ return static_cast<V>((((((((((((((((a[16] * x + a[15]) * x + a[14]) * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<18>*)
+{
+ return static_cast<V>(((((((((((((((((a[17] * x + a[16]) * x + a[15]) * x + a[14]) * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<19>*)
+{
+ return static_cast<V>((((((((((((((((((a[18] * x + a[17]) * x + a[16]) * x + a[15]) * x + a[14]) * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<20>*)
+{
+ return static_cast<V>(((((((((((((((((((a[19] * x + a[18]) * x + a[17]) * x + a[16]) * x + a[15]) * x + a[14]) * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_3.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_3.hpp
new file mode 100644
index 00000000000..715a69aee01
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_3.hpp
@@ -0,0 +1,42 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_EVAL_3_HPP
+#define BOOST_MATH_TOOLS_POLY_EVAL_3_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>(a[1] * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>((a[2] * x + a[1]) * x + a[0]);
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_4.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_4.hpp
new file mode 100644
index 00000000000..d74b7a6386c
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_4.hpp
@@ -0,0 +1,48 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_EVAL_4_HPP
+#define BOOST_MATH_TOOLS_POLY_EVAL_4_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>(a[1] * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>((a[2] * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>(((a[3] * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_5.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_5.hpp
new file mode 100644
index 00000000000..bb66e6c41d4
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_5.hpp
@@ -0,0 +1,54 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_EVAL_5_HPP
+#define BOOST_MATH_TOOLS_POLY_EVAL_5_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>(a[1] * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>((a[2] * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>(((a[3] * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<5>*)
+{
+ return static_cast<V>((((a[4] * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_6.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_6.hpp
new file mode 100644
index 00000000000..a29c2710e8c
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_6.hpp
@@ -0,0 +1,60 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_EVAL_6_HPP
+#define BOOST_MATH_TOOLS_POLY_EVAL_6_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>(a[1] * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>((a[2] * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>(((a[3] * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<5>*)
+{
+ return static_cast<V>((((a[4] * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<6>*)
+{
+ return static_cast<V>(((((a[5] * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_7.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_7.hpp
new file mode 100644
index 00000000000..093ab89b027
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_7.hpp
@@ -0,0 +1,66 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_EVAL_7_HPP
+#define BOOST_MATH_TOOLS_POLY_EVAL_7_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>(a[1] * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>((a[2] * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>(((a[3] * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<5>*)
+{
+ return static_cast<V>((((a[4] * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<6>*)
+{
+ return static_cast<V>(((((a[5] * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<7>*)
+{
+ return static_cast<V>((((((a[6] * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_8.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_8.hpp
new file mode 100644
index 00000000000..a3d329a37b6
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_8.hpp
@@ -0,0 +1,72 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_EVAL_8_HPP
+#define BOOST_MATH_TOOLS_POLY_EVAL_8_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>(a[1] * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>((a[2] * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>(((a[3] * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<5>*)
+{
+ return static_cast<V>((((a[4] * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<6>*)
+{
+ return static_cast<V>(((((a[5] * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<7>*)
+{
+ return static_cast<V>((((((a[6] * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<8>*)
+{
+ return static_cast<V>(((((((a[7] * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_9.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_9.hpp
new file mode 100644
index 00000000000..e90f578d048
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner1_9.hpp
@@ -0,0 +1,78 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_EVAL_9_HPP
+#define BOOST_MATH_TOOLS_POLY_EVAL_9_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>(a[1] * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>((a[2] * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>(((a[3] * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<5>*)
+{
+ return static_cast<V>((((a[4] * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<6>*)
+{
+ return static_cast<V>(((((a[5] * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<7>*)
+{
+ return static_cast<V>((((((a[6] * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<8>*)
+{
+ return static_cast<V>(((((((a[7] * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<9>*)
+{
+ return static_cast<V>((((((((a[8] * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_10.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_10.hpp
new file mode 100644
index 00000000000..7c4101f465b
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_10.hpp
@@ -0,0 +1,90 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_EVAL_10_HPP
+#define BOOST_MATH_TOOLS_POLY_EVAL_10_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>(a[1] * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>((a[2] * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>(((a[3] * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<5>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((a[4] * x2 + a[2]) * x2 + a[0] + (a[3] * x2 + a[1]) * x);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<6>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((a[5] * x2 + a[3]) * x2 + a[1]) * x + (a[4] * x2 + a[2]) * x2 + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<7>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((a[5] * x2 + a[3]) * x2 + a[1]) * x);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<8>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<9>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<10>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((((a[9] * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + (((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]);
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_11.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_11.hpp
new file mode 100644
index 00000000000..bebd1e6483b
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_11.hpp
@@ -0,0 +1,97 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_EVAL_11_HPP
+#define BOOST_MATH_TOOLS_POLY_EVAL_11_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>(a[1] * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>((a[2] * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>(((a[3] * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<5>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((a[4] * x2 + a[2]) * x2 + a[0] + (a[3] * x2 + a[1]) * x);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<6>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((a[5] * x2 + a[3]) * x2 + a[1]) * x + (a[4] * x2 + a[2]) * x2 + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<7>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((a[5] * x2 + a[3]) * x2 + a[1]) * x);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<8>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<9>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<10>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((((a[9] * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + (((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<11>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((((a[10] * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((((a[9] * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x);
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_12.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_12.hpp
new file mode 100644
index 00000000000..c4da24ac887
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_12.hpp
@@ -0,0 +1,104 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_EVAL_12_HPP
+#define BOOST_MATH_TOOLS_POLY_EVAL_12_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>(a[1] * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>((a[2] * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>(((a[3] * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<5>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((a[4] * x2 + a[2]) * x2 + a[0] + (a[3] * x2 + a[1]) * x);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<6>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((a[5] * x2 + a[3]) * x2 + a[1]) * x + (a[4] * x2 + a[2]) * x2 + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<7>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((a[5] * x2 + a[3]) * x2 + a[1]) * x);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<8>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<9>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<10>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((((a[9] * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + (((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<11>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((((a[10] * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((((a[9] * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<12>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((((((a[11] * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((((a[10] * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]);
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_13.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_13.hpp
new file mode 100644
index 00000000000..5d7dddc5b5d
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_13.hpp
@@ -0,0 +1,111 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_EVAL_13_HPP
+#define BOOST_MATH_TOOLS_POLY_EVAL_13_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>(a[1] * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>((a[2] * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>(((a[3] * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<5>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((a[4] * x2 + a[2]) * x2 + a[0] + (a[3] * x2 + a[1]) * x);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<6>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((a[5] * x2 + a[3]) * x2 + a[1]) * x + (a[4] * x2 + a[2]) * x2 + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<7>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((a[5] * x2 + a[3]) * x2 + a[1]) * x);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<8>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<9>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<10>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((((a[9] * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + (((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<11>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((((a[10] * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((((a[9] * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<12>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((((((a[11] * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((((a[10] * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<13>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((((((a[12] * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((((a[11] * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x);
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_14.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_14.hpp
new file mode 100644
index 00000000000..21a5a37903a
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_14.hpp
@@ -0,0 +1,118 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_EVAL_14_HPP
+#define BOOST_MATH_TOOLS_POLY_EVAL_14_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>(a[1] * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>((a[2] * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>(((a[3] * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<5>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((a[4] * x2 + a[2]) * x2 + a[0] + (a[3] * x2 + a[1]) * x);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<6>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((a[5] * x2 + a[3]) * x2 + a[1]) * x + (a[4] * x2 + a[2]) * x2 + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<7>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((a[5] * x2 + a[3]) * x2 + a[1]) * x);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<8>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<9>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<10>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((((a[9] * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + (((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<11>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((((a[10] * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((((a[9] * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<12>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((((((a[11] * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((((a[10] * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<13>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((((((a[12] * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((((a[11] * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<14>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((((((a[13] * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + (((((a[12] * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]);
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_15.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_15.hpp
new file mode 100644
index 00000000000..7b41214466e
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_15.hpp
@@ -0,0 +1,125 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_EVAL_15_HPP
+#define BOOST_MATH_TOOLS_POLY_EVAL_15_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>(a[1] * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>((a[2] * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>(((a[3] * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<5>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((a[4] * x2 + a[2]) * x2 + a[0] + (a[3] * x2 + a[1]) * x);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<6>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((a[5] * x2 + a[3]) * x2 + a[1]) * x + (a[4] * x2 + a[2]) * x2 + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<7>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((a[5] * x2 + a[3]) * x2 + a[1]) * x);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<8>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<9>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<10>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((((a[9] * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + (((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<11>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((((a[10] * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((((a[9] * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<12>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((((((a[11] * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((((a[10] * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<13>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((((((a[12] * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((((a[11] * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<14>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((((((a[13] * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + (((((a[12] * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<15>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((((((a[14] * x2 + a[12]) * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((((((a[13] * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x);
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_16.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_16.hpp
new file mode 100644
index 00000000000..aa3763ad65d
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_16.hpp
@@ -0,0 +1,132 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_EVAL_16_HPP
+#define BOOST_MATH_TOOLS_POLY_EVAL_16_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>(a[1] * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>((a[2] * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>(((a[3] * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<5>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((a[4] * x2 + a[2]) * x2 + a[0] + (a[3] * x2 + a[1]) * x);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<6>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((a[5] * x2 + a[3]) * x2 + a[1]) * x + (a[4] * x2 + a[2]) * x2 + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<7>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((a[5] * x2 + a[3]) * x2 + a[1]) * x);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<8>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<9>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<10>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((((a[9] * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + (((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<11>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((((a[10] * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((((a[9] * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<12>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((((((a[11] * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((((a[10] * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<13>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((((((a[12] * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((((a[11] * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<14>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((((((a[13] * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + (((((a[12] * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<15>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((((((a[14] * x2 + a[12]) * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((((((a[13] * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<16>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((((((((a[15] * x2 + a[13]) * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((((((a[14] * x2 + a[12]) * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]);
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_17.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_17.hpp
new file mode 100644
index 00000000000..6ed5566d490
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_17.hpp
@@ -0,0 +1,139 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_EVAL_17_HPP
+#define BOOST_MATH_TOOLS_POLY_EVAL_17_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>(a[1] * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>((a[2] * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>(((a[3] * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<5>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((a[4] * x2 + a[2]) * x2 + a[0] + (a[3] * x2 + a[1]) * x);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<6>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((a[5] * x2 + a[3]) * x2 + a[1]) * x + (a[4] * x2 + a[2]) * x2 + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<7>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((a[5] * x2 + a[3]) * x2 + a[1]) * x);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<8>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<9>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<10>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((((a[9] * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + (((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<11>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((((a[10] * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((((a[9] * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<12>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((((((a[11] * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((((a[10] * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<13>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((((((a[12] * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((((a[11] * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<14>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((((((a[13] * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + (((((a[12] * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<15>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((((((a[14] * x2 + a[12]) * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((((((a[13] * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<16>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((((((((a[15] * x2 + a[13]) * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((((((a[14] * x2 + a[12]) * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<17>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((((((((a[16] * x2 + a[14]) * x2 + a[12]) * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((((((a[15] * x2 + a[13]) * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x);
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_18.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_18.hpp
new file mode 100644
index 00000000000..02c72b82277
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_18.hpp
@@ -0,0 +1,146 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_EVAL_18_HPP
+#define BOOST_MATH_TOOLS_POLY_EVAL_18_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>(a[1] * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>((a[2] * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>(((a[3] * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<5>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((a[4] * x2 + a[2]) * x2 + a[0] + (a[3] * x2 + a[1]) * x);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<6>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((a[5] * x2 + a[3]) * x2 + a[1]) * x + (a[4] * x2 + a[2]) * x2 + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<7>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((a[5] * x2 + a[3]) * x2 + a[1]) * x);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<8>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<9>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<10>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((((a[9] * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + (((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<11>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((((a[10] * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((((a[9] * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<12>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((((((a[11] * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((((a[10] * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<13>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((((((a[12] * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((((a[11] * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<14>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((((((a[13] * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + (((((a[12] * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<15>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((((((a[14] * x2 + a[12]) * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((((((a[13] * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<16>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((((((((a[15] * x2 + a[13]) * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((((((a[14] * x2 + a[12]) * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<17>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((((((((a[16] * x2 + a[14]) * x2 + a[12]) * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((((((a[15] * x2 + a[13]) * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<18>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((((((((a[17] * x2 + a[15]) * x2 + a[13]) * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + (((((((a[16] * x2 + a[14]) * x2 + a[12]) * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]);
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_19.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_19.hpp
new file mode 100644
index 00000000000..6e36ace904a
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_19.hpp
@@ -0,0 +1,153 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_EVAL_19_HPP
+#define BOOST_MATH_TOOLS_POLY_EVAL_19_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>(a[1] * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>((a[2] * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>(((a[3] * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<5>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((a[4] * x2 + a[2]) * x2 + a[0] + (a[3] * x2 + a[1]) * x);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<6>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((a[5] * x2 + a[3]) * x2 + a[1]) * x + (a[4] * x2 + a[2]) * x2 + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<7>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((a[5] * x2 + a[3]) * x2 + a[1]) * x);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<8>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<9>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<10>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((((a[9] * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + (((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<11>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((((a[10] * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((((a[9] * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<12>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((((((a[11] * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((((a[10] * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<13>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((((((a[12] * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((((a[11] * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<14>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((((((a[13] * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + (((((a[12] * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<15>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((((((a[14] * x2 + a[12]) * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((((((a[13] * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<16>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((((((((a[15] * x2 + a[13]) * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((((((a[14] * x2 + a[12]) * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<17>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((((((((a[16] * x2 + a[14]) * x2 + a[12]) * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((((((a[15] * x2 + a[13]) * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<18>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((((((((a[17] * x2 + a[15]) * x2 + a[13]) * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + (((((((a[16] * x2 + a[14]) * x2 + a[12]) * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<19>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((((((((a[18] * x2 + a[16]) * x2 + a[14]) * x2 + a[12]) * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((((((((a[17] * x2 + a[15]) * x2 + a[13]) * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x);
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_2.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_2.hpp
new file mode 100644
index 00000000000..e2a4e7faefb
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_2.hpp
@@ -0,0 +1,48 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_EVAL_2_HPP
+#define BOOST_MATH_TOOLS_POLY_EVAL_2_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>(a[1] * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>((a[2] * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>(((a[3] * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_20.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_20.hpp
new file mode 100644
index 00000000000..e394b6b3258
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_20.hpp
@@ -0,0 +1,160 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_EVAL_20_HPP
+#define BOOST_MATH_TOOLS_POLY_EVAL_20_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>(a[1] * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>((a[2] * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>(((a[3] * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<5>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((a[4] * x2 + a[2]) * x2 + a[0] + (a[3] * x2 + a[1]) * x);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<6>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((a[5] * x2 + a[3]) * x2 + a[1]) * x + (a[4] * x2 + a[2]) * x2 + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<7>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((a[5] * x2 + a[3]) * x2 + a[1]) * x);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<8>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<9>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<10>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((((a[9] * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + (((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<11>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((((a[10] * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((((a[9] * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<12>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((((((a[11] * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((((a[10] * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<13>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((((((a[12] * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((((a[11] * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<14>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((((((a[13] * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + (((((a[12] * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<15>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((((((a[14] * x2 + a[12]) * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((((((a[13] * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<16>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((((((((a[15] * x2 + a[13]) * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((((((a[14] * x2 + a[12]) * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<17>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((((((((a[16] * x2 + a[14]) * x2 + a[12]) * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((((((a[15] * x2 + a[13]) * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<18>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((((((((a[17] * x2 + a[15]) * x2 + a[13]) * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + (((((((a[16] * x2 + a[14]) * x2 + a[12]) * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<19>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((((((((a[18] * x2 + a[16]) * x2 + a[14]) * x2 + a[12]) * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((((((((a[17] * x2 + a[15]) * x2 + a[13]) * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<20>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((((((((((a[19] * x2 + a[17]) * x2 + a[15]) * x2 + a[13]) * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((((((((a[18] * x2 + a[16]) * x2 + a[14]) * x2 + a[12]) * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]);
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_3.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_3.hpp
new file mode 100644
index 00000000000..187b86c1cef
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_3.hpp
@@ -0,0 +1,48 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_EVAL_3_HPP
+#define BOOST_MATH_TOOLS_POLY_EVAL_3_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>(a[1] * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>((a[2] * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>(((a[3] * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_4.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_4.hpp
new file mode 100644
index 00000000000..84badc365a5
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_4.hpp
@@ -0,0 +1,48 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_EVAL_4_HPP
+#define BOOST_MATH_TOOLS_POLY_EVAL_4_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>(a[1] * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>((a[2] * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>(((a[3] * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_5.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_5.hpp
new file mode 100644
index 00000000000..287b4be08ef
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_5.hpp
@@ -0,0 +1,55 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_EVAL_5_HPP
+#define BOOST_MATH_TOOLS_POLY_EVAL_5_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>(a[1] * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>((a[2] * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>(((a[3] * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<5>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((a[4] * x2 + a[2]) * x2 + a[0] + (a[3] * x2 + a[1]) * x);
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_6.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_6.hpp
new file mode 100644
index 00000000000..3662d44f93e
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_6.hpp
@@ -0,0 +1,62 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_EVAL_6_HPP
+#define BOOST_MATH_TOOLS_POLY_EVAL_6_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>(a[1] * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>((a[2] * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>(((a[3] * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<5>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((a[4] * x2 + a[2]) * x2 + a[0] + (a[3] * x2 + a[1]) * x);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<6>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((a[5] * x2 + a[3]) * x2 + a[1]) * x + (a[4] * x2 + a[2]) * x2 + a[0]);
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_7.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_7.hpp
new file mode 100644
index 00000000000..78ed0df54d3
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_7.hpp
@@ -0,0 +1,69 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_EVAL_7_HPP
+#define BOOST_MATH_TOOLS_POLY_EVAL_7_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>(a[1] * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>((a[2] * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>(((a[3] * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<5>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((a[4] * x2 + a[2]) * x2 + a[0] + (a[3] * x2 + a[1]) * x);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<6>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((a[5] * x2 + a[3]) * x2 + a[1]) * x + (a[4] * x2 + a[2]) * x2 + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<7>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((a[5] * x2 + a[3]) * x2 + a[1]) * x);
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_8.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_8.hpp
new file mode 100644
index 00000000000..ac8e9411800
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_8.hpp
@@ -0,0 +1,76 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_EVAL_8_HPP
+#define BOOST_MATH_TOOLS_POLY_EVAL_8_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>(a[1] * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>((a[2] * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>(((a[3] * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<5>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((a[4] * x2 + a[2]) * x2 + a[0] + (a[3] * x2 + a[1]) * x);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<6>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((a[5] * x2 + a[3]) * x2 + a[1]) * x + (a[4] * x2 + a[2]) * x2 + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<7>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((a[5] * x2 + a[3]) * x2 + a[1]) * x);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<8>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0]);
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_9.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_9.hpp
new file mode 100644
index 00000000000..e1a3d17ecae
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner2_9.hpp
@@ -0,0 +1,83 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_EVAL_9_HPP
+#define BOOST_MATH_TOOLS_POLY_EVAL_9_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>(a[1] * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>((a[2] * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>(((a[3] * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<5>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((a[4] * x2 + a[2]) * x2 + a[0] + (a[3] * x2 + a[1]) * x);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<6>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((a[5] * x2 + a[3]) * x2 + a[1]) * x + (a[4] * x2 + a[2]) * x2 + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<7>*)
+{
+ V x2 = x * x;
+ return static_cast<V>(((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((a[5] * x2 + a[3]) * x2 + a[1]) * x);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<8>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<9>*)
+{
+ V x2 = x * x;
+ return static_cast<V>((((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x);
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_10.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_10.hpp
new file mode 100644
index 00000000000..69736d71187
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_10.hpp
@@ -0,0 +1,156 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Unrolled polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_EVAL_10_HPP
+#define BOOST_MATH_TOOLS_POLY_EVAL_10_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>(a[1] * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>((a[2] * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>(((a[3] * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<5>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[4] * x2 + a[2]);
+ t[1] = static_cast<V>(a[3] * x2 + a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<6>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = a[5] * x2 + a[3];
+ t[1] = a[4] * x2 + a[2];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[0] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<7>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[6] * x2 + a[4]);
+ t[1] = static_cast<V>(a[5] * x2 + a[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<8>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = a[7] * x2 + a[5];
+ t[1] = a[6] * x2 + a[4];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[0] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<9>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[8] * x2 + a[6]);
+ t[1] = static_cast<V>(a[7] * x2 + a[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<10>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = a[9] * x2 + a[7];
+ t[1] = a[8] * x2 + a[6];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[0] *= x;
+ return t[0] + t[1];
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_11.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_11.hpp
new file mode 100644
index 00000000000..273ed535cc7
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_11.hpp
@@ -0,0 +1,181 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Unrolled polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_EVAL_11_HPP
+#define BOOST_MATH_TOOLS_POLY_EVAL_11_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>(a[1] * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>((a[2] * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>(((a[3] * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<5>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[4] * x2 + a[2]);
+ t[1] = static_cast<V>(a[3] * x2 + a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<6>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = a[5] * x2 + a[3];
+ t[1] = a[4] * x2 + a[2];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[0] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<7>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[6] * x2 + a[4]);
+ t[1] = static_cast<V>(a[5] * x2 + a[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<8>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = a[7] * x2 + a[5];
+ t[1] = a[6] * x2 + a[4];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[0] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<9>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[8] * x2 + a[6]);
+ t[1] = static_cast<V>(a[7] * x2 + a[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<10>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = a[9] * x2 + a[7];
+ t[1] = a[8] * x2 + a[6];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[0] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<11>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[10] * x2 + a[8]);
+ t[1] = static_cast<V>(a[9] * x2 + a[7]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_12.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_12.hpp
new file mode 100644
index 00000000000..340567400b9
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_12.hpp
@@ -0,0 +1,208 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Unrolled polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_EVAL_12_HPP
+#define BOOST_MATH_TOOLS_POLY_EVAL_12_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>(a[1] * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>((a[2] * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>(((a[3] * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<5>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[4] * x2 + a[2]);
+ t[1] = static_cast<V>(a[3] * x2 + a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<6>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = a[5] * x2 + a[3];
+ t[1] = a[4] * x2 + a[2];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[0] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<7>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[6] * x2 + a[4]);
+ t[1] = static_cast<V>(a[5] * x2 + a[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<8>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = a[7] * x2 + a[5];
+ t[1] = a[6] * x2 + a[4];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[0] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<9>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[8] * x2 + a[6]);
+ t[1] = static_cast<V>(a[7] * x2 + a[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<10>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = a[9] * x2 + a[7];
+ t[1] = a[8] * x2 + a[6];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[0] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<11>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[10] * x2 + a[8]);
+ t[1] = static_cast<V>(a[9] * x2 + a[7]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<12>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = a[11] * x2 + a[9];
+ t[1] = a[10] * x2 + a[8];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[7]);
+ t[1] += static_cast<V>(a[6]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[0] *= x;
+ return t[0] + t[1];
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_13.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_13.hpp
new file mode 100644
index 00000000000..849c93e54ac
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_13.hpp
@@ -0,0 +1,237 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Unrolled polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_EVAL_13_HPP
+#define BOOST_MATH_TOOLS_POLY_EVAL_13_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>(a[1] * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>((a[2] * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>(((a[3] * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<5>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[4] * x2 + a[2]);
+ t[1] = static_cast<V>(a[3] * x2 + a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<6>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = a[5] * x2 + a[3];
+ t[1] = a[4] * x2 + a[2];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[0] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<7>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[6] * x2 + a[4]);
+ t[1] = static_cast<V>(a[5] * x2 + a[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<8>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = a[7] * x2 + a[5];
+ t[1] = a[6] * x2 + a[4];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[0] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<9>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[8] * x2 + a[6]);
+ t[1] = static_cast<V>(a[7] * x2 + a[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<10>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = a[9] * x2 + a[7];
+ t[1] = a[8] * x2 + a[6];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[0] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<11>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[10] * x2 + a[8]);
+ t[1] = static_cast<V>(a[9] * x2 + a[7]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<12>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = a[11] * x2 + a[9];
+ t[1] = a[10] * x2 + a[8];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[7]);
+ t[1] += static_cast<V>(a[6]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[0] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<13>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[12] * x2 + a[10]);
+ t[1] = static_cast<V>(a[11] * x2 + a[9]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[7]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_14.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_14.hpp
new file mode 100644
index 00000000000..f5ac1df9d18
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_14.hpp
@@ -0,0 +1,268 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Unrolled polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_EVAL_14_HPP
+#define BOOST_MATH_TOOLS_POLY_EVAL_14_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>(a[1] * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>((a[2] * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>(((a[3] * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<5>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[4] * x2 + a[2]);
+ t[1] = static_cast<V>(a[3] * x2 + a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<6>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = a[5] * x2 + a[3];
+ t[1] = a[4] * x2 + a[2];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[0] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<7>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[6] * x2 + a[4]);
+ t[1] = static_cast<V>(a[5] * x2 + a[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<8>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = a[7] * x2 + a[5];
+ t[1] = a[6] * x2 + a[4];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[0] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<9>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[8] * x2 + a[6]);
+ t[1] = static_cast<V>(a[7] * x2 + a[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<10>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = a[9] * x2 + a[7];
+ t[1] = a[8] * x2 + a[6];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[0] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<11>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[10] * x2 + a[8]);
+ t[1] = static_cast<V>(a[9] * x2 + a[7]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<12>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = a[11] * x2 + a[9];
+ t[1] = a[10] * x2 + a[8];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[7]);
+ t[1] += static_cast<V>(a[6]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[0] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<13>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[12] * x2 + a[10]);
+ t[1] = static_cast<V>(a[11] * x2 + a[9]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[7]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<14>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = a[13] * x2 + a[11];
+ t[1] = a[12] * x2 + a[10];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[9]);
+ t[1] += static_cast<V>(a[8]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[7]);
+ t[1] += static_cast<V>(a[6]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[0] *= x;
+ return t[0] + t[1];
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_15.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_15.hpp
new file mode 100644
index 00000000000..b57af7e3dc6
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_15.hpp
@@ -0,0 +1,301 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Unrolled polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_EVAL_15_HPP
+#define BOOST_MATH_TOOLS_POLY_EVAL_15_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>(a[1] * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>((a[2] * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>(((a[3] * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<5>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[4] * x2 + a[2]);
+ t[1] = static_cast<V>(a[3] * x2 + a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<6>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = a[5] * x2 + a[3];
+ t[1] = a[4] * x2 + a[2];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[0] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<7>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[6] * x2 + a[4]);
+ t[1] = static_cast<V>(a[5] * x2 + a[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<8>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = a[7] * x2 + a[5];
+ t[1] = a[6] * x2 + a[4];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[0] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<9>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[8] * x2 + a[6]);
+ t[1] = static_cast<V>(a[7] * x2 + a[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<10>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = a[9] * x2 + a[7];
+ t[1] = a[8] * x2 + a[6];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[0] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<11>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[10] * x2 + a[8]);
+ t[1] = static_cast<V>(a[9] * x2 + a[7]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<12>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = a[11] * x2 + a[9];
+ t[1] = a[10] * x2 + a[8];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[7]);
+ t[1] += static_cast<V>(a[6]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[0] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<13>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[12] * x2 + a[10]);
+ t[1] = static_cast<V>(a[11] * x2 + a[9]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[7]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<14>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = a[13] * x2 + a[11];
+ t[1] = a[12] * x2 + a[10];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[9]);
+ t[1] += static_cast<V>(a[8]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[7]);
+ t[1] += static_cast<V>(a[6]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[0] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<15>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[14] * x2 + a[12]);
+ t[1] = static_cast<V>(a[13] * x2 + a[11]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[9]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[7]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_16.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_16.hpp
new file mode 100644
index 00000000000..1fc8560a21d
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_16.hpp
@@ -0,0 +1,336 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Unrolled polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_EVAL_16_HPP
+#define BOOST_MATH_TOOLS_POLY_EVAL_16_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>(a[1] * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>((a[2] * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>(((a[3] * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<5>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[4] * x2 + a[2]);
+ t[1] = static_cast<V>(a[3] * x2 + a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<6>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = a[5] * x2 + a[3];
+ t[1] = a[4] * x2 + a[2];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[0] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<7>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[6] * x2 + a[4]);
+ t[1] = static_cast<V>(a[5] * x2 + a[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<8>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = a[7] * x2 + a[5];
+ t[1] = a[6] * x2 + a[4];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[0] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<9>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[8] * x2 + a[6]);
+ t[1] = static_cast<V>(a[7] * x2 + a[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<10>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = a[9] * x2 + a[7];
+ t[1] = a[8] * x2 + a[6];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[0] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<11>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[10] * x2 + a[8]);
+ t[1] = static_cast<V>(a[9] * x2 + a[7]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<12>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = a[11] * x2 + a[9];
+ t[1] = a[10] * x2 + a[8];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[7]);
+ t[1] += static_cast<V>(a[6]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[0] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<13>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[12] * x2 + a[10]);
+ t[1] = static_cast<V>(a[11] * x2 + a[9]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[7]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<14>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = a[13] * x2 + a[11];
+ t[1] = a[12] * x2 + a[10];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[9]);
+ t[1] += static_cast<V>(a[8]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[7]);
+ t[1] += static_cast<V>(a[6]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[0] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<15>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[14] * x2 + a[12]);
+ t[1] = static_cast<V>(a[13] * x2 + a[11]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[9]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[7]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<16>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = a[15] * x2 + a[13];
+ t[1] = a[14] * x2 + a[12];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[11]);
+ t[1] += static_cast<V>(a[10]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[9]);
+ t[1] += static_cast<V>(a[8]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[7]);
+ t[1] += static_cast<V>(a[6]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[0] *= x;
+ return t[0] + t[1];
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_17.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_17.hpp
new file mode 100644
index 00000000000..4a0d0aa4728
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_17.hpp
@@ -0,0 +1,373 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Unrolled polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_EVAL_17_HPP
+#define BOOST_MATH_TOOLS_POLY_EVAL_17_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>(a[1] * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>((a[2] * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>(((a[3] * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<5>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[4] * x2 + a[2]);
+ t[1] = static_cast<V>(a[3] * x2 + a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<6>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = a[5] * x2 + a[3];
+ t[1] = a[4] * x2 + a[2];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[0] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<7>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[6] * x2 + a[4]);
+ t[1] = static_cast<V>(a[5] * x2 + a[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<8>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = a[7] * x2 + a[5];
+ t[1] = a[6] * x2 + a[4];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[0] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<9>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[8] * x2 + a[6]);
+ t[1] = static_cast<V>(a[7] * x2 + a[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<10>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = a[9] * x2 + a[7];
+ t[1] = a[8] * x2 + a[6];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[0] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<11>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[10] * x2 + a[8]);
+ t[1] = static_cast<V>(a[9] * x2 + a[7]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<12>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = a[11] * x2 + a[9];
+ t[1] = a[10] * x2 + a[8];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[7]);
+ t[1] += static_cast<V>(a[6]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[0] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<13>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[12] * x2 + a[10]);
+ t[1] = static_cast<V>(a[11] * x2 + a[9]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[7]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<14>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = a[13] * x2 + a[11];
+ t[1] = a[12] * x2 + a[10];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[9]);
+ t[1] += static_cast<V>(a[8]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[7]);
+ t[1] += static_cast<V>(a[6]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[0] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<15>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[14] * x2 + a[12]);
+ t[1] = static_cast<V>(a[13] * x2 + a[11]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[9]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[7]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<16>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = a[15] * x2 + a[13];
+ t[1] = a[14] * x2 + a[12];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[11]);
+ t[1] += static_cast<V>(a[10]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[9]);
+ t[1] += static_cast<V>(a[8]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[7]);
+ t[1] += static_cast<V>(a[6]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[0] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<17>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[16] * x2 + a[14]);
+ t[1] = static_cast<V>(a[15] * x2 + a[13]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[12]);
+ t[1] += static_cast<V>(a[11]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[9]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[7]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_18.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_18.hpp
new file mode 100644
index 00000000000..899117d2f91
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_18.hpp
@@ -0,0 +1,412 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Unrolled polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_EVAL_18_HPP
+#define BOOST_MATH_TOOLS_POLY_EVAL_18_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>(a[1] * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>((a[2] * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>(((a[3] * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<5>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[4] * x2 + a[2]);
+ t[1] = static_cast<V>(a[3] * x2 + a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<6>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = a[5] * x2 + a[3];
+ t[1] = a[4] * x2 + a[2];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[0] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<7>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[6] * x2 + a[4]);
+ t[1] = static_cast<V>(a[5] * x2 + a[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<8>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = a[7] * x2 + a[5];
+ t[1] = a[6] * x2 + a[4];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[0] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<9>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[8] * x2 + a[6]);
+ t[1] = static_cast<V>(a[7] * x2 + a[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<10>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = a[9] * x2 + a[7];
+ t[1] = a[8] * x2 + a[6];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[0] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<11>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[10] * x2 + a[8]);
+ t[1] = static_cast<V>(a[9] * x2 + a[7]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<12>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = a[11] * x2 + a[9];
+ t[1] = a[10] * x2 + a[8];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[7]);
+ t[1] += static_cast<V>(a[6]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[0] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<13>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[12] * x2 + a[10]);
+ t[1] = static_cast<V>(a[11] * x2 + a[9]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[7]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<14>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = a[13] * x2 + a[11];
+ t[1] = a[12] * x2 + a[10];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[9]);
+ t[1] += static_cast<V>(a[8]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[7]);
+ t[1] += static_cast<V>(a[6]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[0] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<15>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[14] * x2 + a[12]);
+ t[1] = static_cast<V>(a[13] * x2 + a[11]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[9]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[7]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<16>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = a[15] * x2 + a[13];
+ t[1] = a[14] * x2 + a[12];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[11]);
+ t[1] += static_cast<V>(a[10]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[9]);
+ t[1] += static_cast<V>(a[8]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[7]);
+ t[1] += static_cast<V>(a[6]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[0] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<17>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[16] * x2 + a[14]);
+ t[1] = static_cast<V>(a[15] * x2 + a[13]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[12]);
+ t[1] += static_cast<V>(a[11]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[9]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[7]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<18>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = a[17] * x2 + a[15];
+ t[1] = a[16] * x2 + a[14];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[13]);
+ t[1] += static_cast<V>(a[12]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[11]);
+ t[1] += static_cast<V>(a[10]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[9]);
+ t[1] += static_cast<V>(a[8]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[7]);
+ t[1] += static_cast<V>(a[6]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[0] *= x;
+ return t[0] + t[1];
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_19.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_19.hpp
new file mode 100644
index 00000000000..7c4f728419c
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_19.hpp
@@ -0,0 +1,453 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Unrolled polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_EVAL_19_HPP
+#define BOOST_MATH_TOOLS_POLY_EVAL_19_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>(a[1] * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>((a[2] * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>(((a[3] * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<5>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[4] * x2 + a[2]);
+ t[1] = static_cast<V>(a[3] * x2 + a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<6>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = a[5] * x2 + a[3];
+ t[1] = a[4] * x2 + a[2];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[0] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<7>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[6] * x2 + a[4]);
+ t[1] = static_cast<V>(a[5] * x2 + a[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<8>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = a[7] * x2 + a[5];
+ t[1] = a[6] * x2 + a[4];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[0] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<9>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[8] * x2 + a[6]);
+ t[1] = static_cast<V>(a[7] * x2 + a[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<10>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = a[9] * x2 + a[7];
+ t[1] = a[8] * x2 + a[6];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[0] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<11>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[10] * x2 + a[8]);
+ t[1] = static_cast<V>(a[9] * x2 + a[7]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<12>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = a[11] * x2 + a[9];
+ t[1] = a[10] * x2 + a[8];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[7]);
+ t[1] += static_cast<V>(a[6]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[0] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<13>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[12] * x2 + a[10]);
+ t[1] = static_cast<V>(a[11] * x2 + a[9]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[7]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<14>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = a[13] * x2 + a[11];
+ t[1] = a[12] * x2 + a[10];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[9]);
+ t[1] += static_cast<V>(a[8]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[7]);
+ t[1] += static_cast<V>(a[6]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[0] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<15>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[14] * x2 + a[12]);
+ t[1] = static_cast<V>(a[13] * x2 + a[11]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[9]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[7]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<16>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = a[15] * x2 + a[13];
+ t[1] = a[14] * x2 + a[12];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[11]);
+ t[1] += static_cast<V>(a[10]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[9]);
+ t[1] += static_cast<V>(a[8]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[7]);
+ t[1] += static_cast<V>(a[6]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[0] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<17>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[16] * x2 + a[14]);
+ t[1] = static_cast<V>(a[15] * x2 + a[13]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[12]);
+ t[1] += static_cast<V>(a[11]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[9]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[7]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<18>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = a[17] * x2 + a[15];
+ t[1] = a[16] * x2 + a[14];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[13]);
+ t[1] += static_cast<V>(a[12]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[11]);
+ t[1] += static_cast<V>(a[10]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[9]);
+ t[1] += static_cast<V>(a[8]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[7]);
+ t[1] += static_cast<V>(a[6]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[0] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<19>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[18] * x2 + a[16]);
+ t[1] = static_cast<V>(a[17] * x2 + a[15]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[14]);
+ t[1] += static_cast<V>(a[13]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[12]);
+ t[1] += static_cast<V>(a[11]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[9]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[7]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_2.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_2.hpp
new file mode 100644
index 00000000000..372630cfd97
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_2.hpp
@@ -0,0 +1,48 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Unrolled polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_EVAL_2_HPP
+#define BOOST_MATH_TOOLS_POLY_EVAL_2_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>(a[1] * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>((a[2] * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>(((a[3] * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_20.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_20.hpp
new file mode 100644
index 00000000000..b20e0d5fe18
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_20.hpp
@@ -0,0 +1,496 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Unrolled polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_EVAL_20_HPP
+#define BOOST_MATH_TOOLS_POLY_EVAL_20_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>(a[1] * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>((a[2] * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>(((a[3] * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<5>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[4] * x2 + a[2]);
+ t[1] = static_cast<V>(a[3] * x2 + a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<6>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = a[5] * x2 + a[3];
+ t[1] = a[4] * x2 + a[2];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[0] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<7>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[6] * x2 + a[4]);
+ t[1] = static_cast<V>(a[5] * x2 + a[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<8>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = a[7] * x2 + a[5];
+ t[1] = a[6] * x2 + a[4];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[0] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<9>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[8] * x2 + a[6]);
+ t[1] = static_cast<V>(a[7] * x2 + a[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<10>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = a[9] * x2 + a[7];
+ t[1] = a[8] * x2 + a[6];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[0] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<11>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[10] * x2 + a[8]);
+ t[1] = static_cast<V>(a[9] * x2 + a[7]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<12>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = a[11] * x2 + a[9];
+ t[1] = a[10] * x2 + a[8];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[7]);
+ t[1] += static_cast<V>(a[6]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[0] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<13>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[12] * x2 + a[10]);
+ t[1] = static_cast<V>(a[11] * x2 + a[9]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[7]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<14>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = a[13] * x2 + a[11];
+ t[1] = a[12] * x2 + a[10];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[9]);
+ t[1] += static_cast<V>(a[8]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[7]);
+ t[1] += static_cast<V>(a[6]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[0] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<15>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[14] * x2 + a[12]);
+ t[1] = static_cast<V>(a[13] * x2 + a[11]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[9]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[7]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<16>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = a[15] * x2 + a[13];
+ t[1] = a[14] * x2 + a[12];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[11]);
+ t[1] += static_cast<V>(a[10]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[9]);
+ t[1] += static_cast<V>(a[8]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[7]);
+ t[1] += static_cast<V>(a[6]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[0] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<17>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[16] * x2 + a[14]);
+ t[1] = static_cast<V>(a[15] * x2 + a[13]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[12]);
+ t[1] += static_cast<V>(a[11]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[9]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[7]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<18>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = a[17] * x2 + a[15];
+ t[1] = a[16] * x2 + a[14];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[13]);
+ t[1] += static_cast<V>(a[12]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[11]);
+ t[1] += static_cast<V>(a[10]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[9]);
+ t[1] += static_cast<V>(a[8]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[7]);
+ t[1] += static_cast<V>(a[6]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[0] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<19>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[18] * x2 + a[16]);
+ t[1] = static_cast<V>(a[17] * x2 + a[15]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[14]);
+ t[1] += static_cast<V>(a[13]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[12]);
+ t[1] += static_cast<V>(a[11]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[9]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[7]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<20>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = a[19] * x2 + a[17];
+ t[1] = a[18] * x2 + a[16];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[15]);
+ t[1] += static_cast<V>(a[14]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[13]);
+ t[1] += static_cast<V>(a[12]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[11]);
+ t[1] += static_cast<V>(a[10]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[9]);
+ t[1] += static_cast<V>(a[8]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[7]);
+ t[1] += static_cast<V>(a[6]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[0] *= x;
+ return t[0] + t[1];
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_3.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_3.hpp
new file mode 100644
index 00000000000..cc6b1a93519
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_3.hpp
@@ -0,0 +1,48 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Unrolled polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_EVAL_3_HPP
+#define BOOST_MATH_TOOLS_POLY_EVAL_3_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>(a[1] * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>((a[2] * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>(((a[3] * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_4.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_4.hpp
new file mode 100644
index 00000000000..74192f0c902
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_4.hpp
@@ -0,0 +1,48 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Unrolled polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_EVAL_4_HPP
+#define BOOST_MATH_TOOLS_POLY_EVAL_4_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>(a[1] * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>((a[2] * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>(((a[3] * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_5.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_5.hpp
new file mode 100644
index 00000000000..73d19009985
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_5.hpp
@@ -0,0 +1,61 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Unrolled polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_EVAL_5_HPP
+#define BOOST_MATH_TOOLS_POLY_EVAL_5_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>(a[1] * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>((a[2] * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>(((a[3] * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<5>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[4] * x2 + a[2]);
+ t[1] = static_cast<V>(a[3] * x2 + a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_6.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_6.hpp
new file mode 100644
index 00000000000..da025748663
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_6.hpp
@@ -0,0 +1,76 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Unrolled polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_EVAL_6_HPP
+#define BOOST_MATH_TOOLS_POLY_EVAL_6_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>(a[1] * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>((a[2] * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>(((a[3] * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<5>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[4] * x2 + a[2]);
+ t[1] = static_cast<V>(a[3] * x2 + a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<6>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = a[5] * x2 + a[3];
+ t[1] = a[4] * x2 + a[2];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[0] *= x;
+ return t[0] + t[1];
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_7.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_7.hpp
new file mode 100644
index 00000000000..d45a6222781
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_7.hpp
@@ -0,0 +1,93 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Unrolled polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_EVAL_7_HPP
+#define BOOST_MATH_TOOLS_POLY_EVAL_7_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>(a[1] * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>((a[2] * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>(((a[3] * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<5>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[4] * x2 + a[2]);
+ t[1] = static_cast<V>(a[3] * x2 + a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<6>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = a[5] * x2 + a[3];
+ t[1] = a[4] * x2 + a[2];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[0] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<7>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[6] * x2 + a[4]);
+ t[1] = static_cast<V>(a[5] * x2 + a[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_8.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_8.hpp
new file mode 100644
index 00000000000..d0198bf3456
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_8.hpp
@@ -0,0 +1,112 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Unrolled polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_EVAL_8_HPP
+#define BOOST_MATH_TOOLS_POLY_EVAL_8_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>(a[1] * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>((a[2] * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>(((a[3] * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<5>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[4] * x2 + a[2]);
+ t[1] = static_cast<V>(a[3] * x2 + a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<6>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = a[5] * x2 + a[3];
+ t[1] = a[4] * x2 + a[2];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[0] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<7>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[6] * x2 + a[4]);
+ t[1] = static_cast<V>(a[5] * x2 + a[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<8>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = a[7] * x2 + a[5];
+ t[1] = a[6] * x2 + a[4];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[0] *= x;
+ return t[0] + t[1];
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_9.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_9.hpp
new file mode 100644
index 00000000000..b3e0b199703
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/polynomial_horner3_9.hpp
@@ -0,0 +1,133 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Unrolled polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_EVAL_9_HPP
+#define BOOST_MATH_TOOLS_POLY_EVAL_9_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>(a[1] * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>((a[2] * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>(((a[3] * x + a[2]) * x + a[1]) * x + a[0]);
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<5>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[4] * x2 + a[2]);
+ t[1] = static_cast<V>(a[3] * x2 + a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<6>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = a[5] * x2 + a[3];
+ t[1] = a[4] * x2 + a[2];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[0] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<7>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[6] * x2 + a[4]);
+ t[1] = static_cast<V>(a[5] * x2 + a[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<8>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = a[7] * x2 + a[5];
+ t[1] = a[6] * x2 + a[4];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[0] *= x;
+ return t[0] + t[1];
+}
+
+template <class T, class V>
+inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<9>*)
+{
+ V x2 = x * x;
+ V t[2];
+ t[0] = static_cast<V>(a[8] * x2 + a[6]);
+ t[1] = static_cast<V>(a[7] * x2 + a[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[0] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[1] *= x;
+ return t[0] + t[1];
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_10.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_10.hpp
new file mode 100644
index 00000000000..919ba6d09f6
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_10.hpp
@@ -0,0 +1,138 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_RAT_10_HPP
+#define BOOST_MATH_TOOLS_POLY_RAT_10_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T*, const U*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]) / static_cast<V>(b[0]);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<2>*)
+{
+ if(x <= 1)
+ return static_cast<V>((a[1] * x + a[0]) / (b[1] * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((a[0] * z + a[1]) / (b[0] * z + b[1]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<3>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((a[0] * z + a[1]) * z + a[2]) / ((b[0] * z + b[1]) * z + b[2]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<4>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) / (((b[0] * z + b[1]) * z + b[2]) * z + b[3]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<5>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((a[4] * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((b[4] * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) / ((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<6>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((((a[5] * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((b[5] * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) / (((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<7>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((((a[6] * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((b[6] * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) / ((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<8>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((((((a[7] * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((b[7] * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) / (((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<9>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((((((a[8] * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((b[8] * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) / ((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<10>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((((((((a[9] * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((b[9] * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) * z + a[9]) / (((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]) * z + b[9]));
+ }
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_11.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_11.hpp
new file mode 100644
index 00000000000..e17bfbc7232
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_11.hpp
@@ -0,0 +1,150 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_RAT_11_HPP
+#define BOOST_MATH_TOOLS_POLY_RAT_11_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T*, const U*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]) / static_cast<V>(b[0]);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<2>*)
+{
+ if(x <= 1)
+ return static_cast<V>((a[1] * x + a[0]) / (b[1] * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((a[0] * z + a[1]) / (b[0] * z + b[1]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<3>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((a[0] * z + a[1]) * z + a[2]) / ((b[0] * z + b[1]) * z + b[2]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<4>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) / (((b[0] * z + b[1]) * z + b[2]) * z + b[3]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<5>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((a[4] * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((b[4] * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) / ((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<6>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((((a[5] * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((b[5] * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) / (((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<7>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((((a[6] * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((b[6] * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) / ((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<8>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((((((a[7] * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((b[7] * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) / (((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<9>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((((((a[8] * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((b[8] * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) / ((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<10>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((((((((a[9] * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((b[9] * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) * z + a[9]) / (((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]) * z + b[9]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<11>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((((((((a[10] * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((((b[10] * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) * z + a[9]) * z + a[10]) / ((((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]) * z + b[9]) * z + b[10]));
+ }
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_12.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_12.hpp
new file mode 100644
index 00000000000..67b430a9906
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_12.hpp
@@ -0,0 +1,162 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_RAT_12_HPP
+#define BOOST_MATH_TOOLS_POLY_RAT_12_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T*, const U*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]) / static_cast<V>(b[0]);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<2>*)
+{
+ if(x <= 1)
+ return static_cast<V>((a[1] * x + a[0]) / (b[1] * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((a[0] * z + a[1]) / (b[0] * z + b[1]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<3>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((a[0] * z + a[1]) * z + a[2]) / ((b[0] * z + b[1]) * z + b[2]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<4>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) / (((b[0] * z + b[1]) * z + b[2]) * z + b[3]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<5>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((a[4] * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((b[4] * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) / ((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<6>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((((a[5] * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((b[5] * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) / (((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<7>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((((a[6] * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((b[6] * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) / ((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<8>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((((((a[7] * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((b[7] * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) / (((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<9>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((((((a[8] * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((b[8] * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) / ((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<10>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((((((((a[9] * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((b[9] * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) * z + a[9]) / (((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]) * z + b[9]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<11>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((((((((a[10] * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((((b[10] * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) * z + a[9]) * z + a[10]) / ((((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]) * z + b[9]) * z + b[10]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<12>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((((((((((a[11] * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((((b[11] * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) * z + a[9]) * z + a[10]) * z + a[11]) / (((((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]) * z + b[9]) * z + b[10]) * z + b[11]));
+ }
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_13.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_13.hpp
new file mode 100644
index 00000000000..33ae67523c7
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_13.hpp
@@ -0,0 +1,174 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_RAT_13_HPP
+#define BOOST_MATH_TOOLS_POLY_RAT_13_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T*, const U*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]) / static_cast<V>(b[0]);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<2>*)
+{
+ if(x <= 1)
+ return static_cast<V>((a[1] * x + a[0]) / (b[1] * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((a[0] * z + a[1]) / (b[0] * z + b[1]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<3>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((a[0] * z + a[1]) * z + a[2]) / ((b[0] * z + b[1]) * z + b[2]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<4>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) / (((b[0] * z + b[1]) * z + b[2]) * z + b[3]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<5>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((a[4] * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((b[4] * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) / ((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<6>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((((a[5] * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((b[5] * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) / (((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<7>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((((a[6] * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((b[6] * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) / ((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<8>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((((((a[7] * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((b[7] * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) / (((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<9>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((((((a[8] * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((b[8] * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) / ((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<10>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((((((((a[9] * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((b[9] * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) * z + a[9]) / (((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]) * z + b[9]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<11>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((((((((a[10] * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((((b[10] * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) * z + a[9]) * z + a[10]) / ((((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]) * z + b[9]) * z + b[10]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<12>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((((((((((a[11] * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((((b[11] * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) * z + a[9]) * z + a[10]) * z + a[11]) / (((((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]) * z + b[9]) * z + b[10]) * z + b[11]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<13>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((((((((((a[12] * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((((((b[12] * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) * z + a[9]) * z + a[10]) * z + a[11]) * z + a[12]) / ((((((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]) * z + b[9]) * z + b[10]) * z + b[11]) * z + b[12]));
+ }
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_14.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_14.hpp
new file mode 100644
index 00000000000..0c5f1884c6b
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_14.hpp
@@ -0,0 +1,186 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_RAT_14_HPP
+#define BOOST_MATH_TOOLS_POLY_RAT_14_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T*, const U*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]) / static_cast<V>(b[0]);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<2>*)
+{
+ if(x <= 1)
+ return static_cast<V>((a[1] * x + a[0]) / (b[1] * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((a[0] * z + a[1]) / (b[0] * z + b[1]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<3>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((a[0] * z + a[1]) * z + a[2]) / ((b[0] * z + b[1]) * z + b[2]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<4>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) / (((b[0] * z + b[1]) * z + b[2]) * z + b[3]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<5>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((a[4] * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((b[4] * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) / ((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<6>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((((a[5] * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((b[5] * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) / (((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<7>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((((a[6] * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((b[6] * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) / ((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<8>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((((((a[7] * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((b[7] * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) / (((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<9>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((((((a[8] * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((b[8] * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) / ((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<10>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((((((((a[9] * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((b[9] * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) * z + a[9]) / (((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]) * z + b[9]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<11>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((((((((a[10] * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((((b[10] * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) * z + a[9]) * z + a[10]) / ((((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]) * z + b[9]) * z + b[10]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<12>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((((((((((a[11] * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((((b[11] * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) * z + a[9]) * z + a[10]) * z + a[11]) / (((((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]) * z + b[9]) * z + b[10]) * z + b[11]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<13>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((((((((((a[12] * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((((((b[12] * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) * z + a[9]) * z + a[10]) * z + a[11]) * z + a[12]) / ((((((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]) * z + b[9]) * z + b[10]) * z + b[11]) * z + b[12]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<14>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((((((((((((a[13] * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((((((b[13] * x + b[12]) * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((((((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) * z + a[9]) * z + a[10]) * z + a[11]) * z + a[12]) * z + a[13]) / (((((((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]) * z + b[9]) * z + b[10]) * z + b[11]) * z + b[12]) * z + b[13]));
+ }
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_15.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_15.hpp
new file mode 100644
index 00000000000..848190761f6
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_15.hpp
@@ -0,0 +1,198 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_RAT_15_HPP
+#define BOOST_MATH_TOOLS_POLY_RAT_15_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T*, const U*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]) / static_cast<V>(b[0]);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<2>*)
+{
+ if(x <= 1)
+ return static_cast<V>((a[1] * x + a[0]) / (b[1] * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((a[0] * z + a[1]) / (b[0] * z + b[1]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<3>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((a[0] * z + a[1]) * z + a[2]) / ((b[0] * z + b[1]) * z + b[2]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<4>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) / (((b[0] * z + b[1]) * z + b[2]) * z + b[3]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<5>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((a[4] * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((b[4] * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) / ((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<6>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((((a[5] * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((b[5] * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) / (((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<7>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((((a[6] * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((b[6] * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) / ((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<8>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((((((a[7] * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((b[7] * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) / (((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<9>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((((((a[8] * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((b[8] * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) / ((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<10>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((((((((a[9] * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((b[9] * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) * z + a[9]) / (((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]) * z + b[9]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<11>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((((((((a[10] * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((((b[10] * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) * z + a[9]) * z + a[10]) / ((((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]) * z + b[9]) * z + b[10]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<12>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((((((((((a[11] * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((((b[11] * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) * z + a[9]) * z + a[10]) * z + a[11]) / (((((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]) * z + b[9]) * z + b[10]) * z + b[11]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<13>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((((((((((a[12] * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((((((b[12] * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) * z + a[9]) * z + a[10]) * z + a[11]) * z + a[12]) / ((((((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]) * z + b[9]) * z + b[10]) * z + b[11]) * z + b[12]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<14>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((((((((((((a[13] * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((((((b[13] * x + b[12]) * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((((((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) * z + a[9]) * z + a[10]) * z + a[11]) * z + a[12]) * z + a[13]) / (((((((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]) * z + b[9]) * z + b[10]) * z + b[11]) * z + b[12]) * z + b[13]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<15>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((((((((((((a[14] * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((((((((b[14] * x + b[13]) * x + b[12]) * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((((((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) * z + a[9]) * z + a[10]) * z + a[11]) * z + a[12]) * z + a[13]) * z + a[14]) / ((((((((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]) * z + b[9]) * z + b[10]) * z + b[11]) * z + b[12]) * z + b[13]) * z + b[14]));
+ }
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_16.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_16.hpp
new file mode 100644
index 00000000000..e0661f8b3ea
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_16.hpp
@@ -0,0 +1,210 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_RAT_16_HPP
+#define BOOST_MATH_TOOLS_POLY_RAT_16_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T*, const U*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]) / static_cast<V>(b[0]);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<2>*)
+{
+ if(x <= 1)
+ return static_cast<V>((a[1] * x + a[0]) / (b[1] * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((a[0] * z + a[1]) / (b[0] * z + b[1]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<3>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((a[0] * z + a[1]) * z + a[2]) / ((b[0] * z + b[1]) * z + b[2]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<4>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) / (((b[0] * z + b[1]) * z + b[2]) * z + b[3]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<5>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((a[4] * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((b[4] * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) / ((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<6>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((((a[5] * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((b[5] * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) / (((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<7>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((((a[6] * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((b[6] * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) / ((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<8>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((((((a[7] * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((b[7] * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) / (((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<9>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((((((a[8] * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((b[8] * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) / ((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<10>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((((((((a[9] * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((b[9] * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) * z + a[9]) / (((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]) * z + b[9]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<11>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((((((((a[10] * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((((b[10] * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) * z + a[9]) * z + a[10]) / ((((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]) * z + b[9]) * z + b[10]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<12>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((((((((((a[11] * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((((b[11] * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) * z + a[9]) * z + a[10]) * z + a[11]) / (((((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]) * z + b[9]) * z + b[10]) * z + b[11]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<13>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((((((((((a[12] * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((((((b[12] * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) * z + a[9]) * z + a[10]) * z + a[11]) * z + a[12]) / ((((((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]) * z + b[9]) * z + b[10]) * z + b[11]) * z + b[12]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<14>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((((((((((((a[13] * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((((((b[13] * x + b[12]) * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((((((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) * z + a[9]) * z + a[10]) * z + a[11]) * z + a[12]) * z + a[13]) / (((((((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]) * z + b[9]) * z + b[10]) * z + b[11]) * z + b[12]) * z + b[13]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<15>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((((((((((((a[14] * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((((((((b[14] * x + b[13]) * x + b[12]) * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((((((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) * z + a[9]) * z + a[10]) * z + a[11]) * z + a[12]) * z + a[13]) * z + a[14]) / ((((((((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]) * z + b[9]) * z + b[10]) * z + b[11]) * z + b[12]) * z + b[13]) * z + b[14]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<16>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((((((((((((((a[15] * x + a[14]) * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((((((((b[15] * x + b[14]) * x + b[13]) * x + b[12]) * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((((((((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) * z + a[9]) * z + a[10]) * z + a[11]) * z + a[12]) * z + a[13]) * z + a[14]) * z + a[15]) / (((((((((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]) * z + b[9]) * z + b[10]) * z + b[11]) * z + b[12]) * z + b[13]) * z + b[14]) * z + b[15]));
+ }
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_17.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_17.hpp
new file mode 100644
index 00000000000..f123da4c95c
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_17.hpp
@@ -0,0 +1,222 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_RAT_17_HPP
+#define BOOST_MATH_TOOLS_POLY_RAT_17_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T*, const U*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]) / static_cast<V>(b[0]);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<2>*)
+{
+ if(x <= 1)
+ return static_cast<V>((a[1] * x + a[0]) / (b[1] * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((a[0] * z + a[1]) / (b[0] * z + b[1]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<3>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((a[0] * z + a[1]) * z + a[2]) / ((b[0] * z + b[1]) * z + b[2]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<4>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) / (((b[0] * z + b[1]) * z + b[2]) * z + b[3]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<5>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((a[4] * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((b[4] * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) / ((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<6>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((((a[5] * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((b[5] * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) / (((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<7>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((((a[6] * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((b[6] * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) / ((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<8>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((((((a[7] * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((b[7] * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) / (((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<9>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((((((a[8] * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((b[8] * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) / ((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<10>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((((((((a[9] * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((b[9] * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) * z + a[9]) / (((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]) * z + b[9]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<11>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((((((((a[10] * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((((b[10] * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) * z + a[9]) * z + a[10]) / ((((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]) * z + b[9]) * z + b[10]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<12>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((((((((((a[11] * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((((b[11] * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) * z + a[9]) * z + a[10]) * z + a[11]) / (((((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]) * z + b[9]) * z + b[10]) * z + b[11]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<13>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((((((((((a[12] * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((((((b[12] * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) * z + a[9]) * z + a[10]) * z + a[11]) * z + a[12]) / ((((((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]) * z + b[9]) * z + b[10]) * z + b[11]) * z + b[12]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<14>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((((((((((((a[13] * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((((((b[13] * x + b[12]) * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((((((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) * z + a[9]) * z + a[10]) * z + a[11]) * z + a[12]) * z + a[13]) / (((((((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]) * z + b[9]) * z + b[10]) * z + b[11]) * z + b[12]) * z + b[13]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<15>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((((((((((((a[14] * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((((((((b[14] * x + b[13]) * x + b[12]) * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((((((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) * z + a[9]) * z + a[10]) * z + a[11]) * z + a[12]) * z + a[13]) * z + a[14]) / ((((((((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]) * z + b[9]) * z + b[10]) * z + b[11]) * z + b[12]) * z + b[13]) * z + b[14]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<16>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((((((((((((((a[15] * x + a[14]) * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((((((((b[15] * x + b[14]) * x + b[13]) * x + b[12]) * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((((((((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) * z + a[9]) * z + a[10]) * z + a[11]) * z + a[12]) * z + a[13]) * z + a[14]) * z + a[15]) / (((((((((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]) * z + b[9]) * z + b[10]) * z + b[11]) * z + b[12]) * z + b[13]) * z + b[14]) * z + b[15]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<17>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((((((((((((((a[16] * x + a[15]) * x + a[14]) * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((((((((((b[16] * x + b[15]) * x + b[14]) * x + b[13]) * x + b[12]) * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((((((((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) * z + a[9]) * z + a[10]) * z + a[11]) * z + a[12]) * z + a[13]) * z + a[14]) * z + a[15]) * z + a[16]) / ((((((((((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]) * z + b[9]) * z + b[10]) * z + b[11]) * z + b[12]) * z + b[13]) * z + b[14]) * z + b[15]) * z + b[16]));
+ }
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_18.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_18.hpp
new file mode 100644
index 00000000000..718ace87fc7
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_18.hpp
@@ -0,0 +1,234 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_RAT_18_HPP
+#define BOOST_MATH_TOOLS_POLY_RAT_18_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T*, const U*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]) / static_cast<V>(b[0]);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<2>*)
+{
+ if(x <= 1)
+ return static_cast<V>((a[1] * x + a[0]) / (b[1] * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((a[0] * z + a[1]) / (b[0] * z + b[1]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<3>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((a[0] * z + a[1]) * z + a[2]) / ((b[0] * z + b[1]) * z + b[2]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<4>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) / (((b[0] * z + b[1]) * z + b[2]) * z + b[3]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<5>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((a[4] * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((b[4] * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) / ((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<6>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((((a[5] * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((b[5] * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) / (((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<7>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((((a[6] * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((b[6] * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) / ((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<8>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((((((a[7] * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((b[7] * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) / (((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<9>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((((((a[8] * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((b[8] * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) / ((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<10>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((((((((a[9] * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((b[9] * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) * z + a[9]) / (((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]) * z + b[9]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<11>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((((((((a[10] * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((((b[10] * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) * z + a[9]) * z + a[10]) / ((((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]) * z + b[9]) * z + b[10]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<12>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((((((((((a[11] * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((((b[11] * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) * z + a[9]) * z + a[10]) * z + a[11]) / (((((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]) * z + b[9]) * z + b[10]) * z + b[11]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<13>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((((((((((a[12] * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((((((b[12] * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) * z + a[9]) * z + a[10]) * z + a[11]) * z + a[12]) / ((((((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]) * z + b[9]) * z + b[10]) * z + b[11]) * z + b[12]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<14>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((((((((((((a[13] * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((((((b[13] * x + b[12]) * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((((((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) * z + a[9]) * z + a[10]) * z + a[11]) * z + a[12]) * z + a[13]) / (((((((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]) * z + b[9]) * z + b[10]) * z + b[11]) * z + b[12]) * z + b[13]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<15>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((((((((((((a[14] * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((((((((b[14] * x + b[13]) * x + b[12]) * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((((((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) * z + a[9]) * z + a[10]) * z + a[11]) * z + a[12]) * z + a[13]) * z + a[14]) / ((((((((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]) * z + b[9]) * z + b[10]) * z + b[11]) * z + b[12]) * z + b[13]) * z + b[14]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<16>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((((((((((((((a[15] * x + a[14]) * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((((((((b[15] * x + b[14]) * x + b[13]) * x + b[12]) * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((((((((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) * z + a[9]) * z + a[10]) * z + a[11]) * z + a[12]) * z + a[13]) * z + a[14]) * z + a[15]) / (((((((((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]) * z + b[9]) * z + b[10]) * z + b[11]) * z + b[12]) * z + b[13]) * z + b[14]) * z + b[15]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<17>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((((((((((((((a[16] * x + a[15]) * x + a[14]) * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((((((((((b[16] * x + b[15]) * x + b[14]) * x + b[13]) * x + b[12]) * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((((((((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) * z + a[9]) * z + a[10]) * z + a[11]) * z + a[12]) * z + a[13]) * z + a[14]) * z + a[15]) * z + a[16]) / ((((((((((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]) * z + b[9]) * z + b[10]) * z + b[11]) * z + b[12]) * z + b[13]) * z + b[14]) * z + b[15]) * z + b[16]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<18>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((((((((((((((((a[17] * x + a[16]) * x + a[15]) * x + a[14]) * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((((((((((b[17] * x + b[16]) * x + b[15]) * x + b[14]) * x + b[13]) * x + b[12]) * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((((((((((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) * z + a[9]) * z + a[10]) * z + a[11]) * z + a[12]) * z + a[13]) * z + a[14]) * z + a[15]) * z + a[16]) * z + a[17]) / (((((((((((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]) * z + b[9]) * z + b[10]) * z + b[11]) * z + b[12]) * z + b[13]) * z + b[14]) * z + b[15]) * z + b[16]) * z + b[17]));
+ }
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_19.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_19.hpp
new file mode 100644
index 00000000000..c849ba8c063
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_19.hpp
@@ -0,0 +1,246 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_RAT_19_HPP
+#define BOOST_MATH_TOOLS_POLY_RAT_19_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T*, const U*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]) / static_cast<V>(b[0]);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<2>*)
+{
+ if(x <= 1)
+ return static_cast<V>((a[1] * x + a[0]) / (b[1] * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((a[0] * z + a[1]) / (b[0] * z + b[1]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<3>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((a[0] * z + a[1]) * z + a[2]) / ((b[0] * z + b[1]) * z + b[2]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<4>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) / (((b[0] * z + b[1]) * z + b[2]) * z + b[3]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<5>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((a[4] * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((b[4] * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) / ((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<6>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((((a[5] * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((b[5] * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) / (((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<7>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((((a[6] * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((b[6] * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) / ((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<8>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((((((a[7] * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((b[7] * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) / (((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<9>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((((((a[8] * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((b[8] * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) / ((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<10>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((((((((a[9] * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((b[9] * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) * z + a[9]) / (((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]) * z + b[9]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<11>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((((((((a[10] * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((((b[10] * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) * z + a[9]) * z + a[10]) / ((((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]) * z + b[9]) * z + b[10]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<12>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((((((((((a[11] * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((((b[11] * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) * z + a[9]) * z + a[10]) * z + a[11]) / (((((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]) * z + b[9]) * z + b[10]) * z + b[11]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<13>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((((((((((a[12] * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((((((b[12] * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) * z + a[9]) * z + a[10]) * z + a[11]) * z + a[12]) / ((((((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]) * z + b[9]) * z + b[10]) * z + b[11]) * z + b[12]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<14>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((((((((((((a[13] * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((((((b[13] * x + b[12]) * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((((((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) * z + a[9]) * z + a[10]) * z + a[11]) * z + a[12]) * z + a[13]) / (((((((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]) * z + b[9]) * z + b[10]) * z + b[11]) * z + b[12]) * z + b[13]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<15>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((((((((((((a[14] * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((((((((b[14] * x + b[13]) * x + b[12]) * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((((((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) * z + a[9]) * z + a[10]) * z + a[11]) * z + a[12]) * z + a[13]) * z + a[14]) / ((((((((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]) * z + b[9]) * z + b[10]) * z + b[11]) * z + b[12]) * z + b[13]) * z + b[14]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<16>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((((((((((((((a[15] * x + a[14]) * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((((((((b[15] * x + b[14]) * x + b[13]) * x + b[12]) * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((((((((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) * z + a[9]) * z + a[10]) * z + a[11]) * z + a[12]) * z + a[13]) * z + a[14]) * z + a[15]) / (((((((((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]) * z + b[9]) * z + b[10]) * z + b[11]) * z + b[12]) * z + b[13]) * z + b[14]) * z + b[15]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<17>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((((((((((((((a[16] * x + a[15]) * x + a[14]) * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((((((((((b[16] * x + b[15]) * x + b[14]) * x + b[13]) * x + b[12]) * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((((((((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) * z + a[9]) * z + a[10]) * z + a[11]) * z + a[12]) * z + a[13]) * z + a[14]) * z + a[15]) * z + a[16]) / ((((((((((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]) * z + b[9]) * z + b[10]) * z + b[11]) * z + b[12]) * z + b[13]) * z + b[14]) * z + b[15]) * z + b[16]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<18>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((((((((((((((((a[17] * x + a[16]) * x + a[15]) * x + a[14]) * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((((((((((b[17] * x + b[16]) * x + b[15]) * x + b[14]) * x + b[13]) * x + b[12]) * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((((((((((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) * z + a[9]) * z + a[10]) * z + a[11]) * z + a[12]) * z + a[13]) * z + a[14]) * z + a[15]) * z + a[16]) * z + a[17]) / (((((((((((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]) * z + b[9]) * z + b[10]) * z + b[11]) * z + b[12]) * z + b[13]) * z + b[14]) * z + b[15]) * z + b[16]) * z + b[17]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<19>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((((((((((((((((a[18] * x + a[17]) * x + a[16]) * x + a[15]) * x + a[14]) * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((((((((((((b[18] * x + b[17]) * x + b[16]) * x + b[15]) * x + b[14]) * x + b[13]) * x + b[12]) * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((((((((((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) * z + a[9]) * z + a[10]) * z + a[11]) * z + a[12]) * z + a[13]) * z + a[14]) * z + a[15]) * z + a[16]) * z + a[17]) * z + a[18]) / ((((((((((((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]) * z + b[9]) * z + b[10]) * z + b[11]) * z + b[12]) * z + b[13]) * z + b[14]) * z + b[15]) * z + b[16]) * z + b[17]) * z + b[18]));
+ }
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_2.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_2.hpp
new file mode 100644
index 00000000000..87e41ab3f9e
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_2.hpp
@@ -0,0 +1,42 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_RAT_2_HPP
+#define BOOST_MATH_TOOLS_POLY_RAT_2_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T*, const U*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]) / static_cast<V>(b[0]);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<2>*)
+{
+ if(x <= 1)
+ return static_cast<V>((a[1] * x + a[0]) / (b[1] * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((a[0] * z + a[1]) / (b[0] * z + b[1]));
+ }
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_20.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_20.hpp
new file mode 100644
index 00000000000..e05eaaa89bd
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_20.hpp
@@ -0,0 +1,258 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_RAT_20_HPP
+#define BOOST_MATH_TOOLS_POLY_RAT_20_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T*, const U*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]) / static_cast<V>(b[0]);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<2>*)
+{
+ if(x <= 1)
+ return static_cast<V>((a[1] * x + a[0]) / (b[1] * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((a[0] * z + a[1]) / (b[0] * z + b[1]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<3>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((a[0] * z + a[1]) * z + a[2]) / ((b[0] * z + b[1]) * z + b[2]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<4>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) / (((b[0] * z + b[1]) * z + b[2]) * z + b[3]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<5>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((a[4] * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((b[4] * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) / ((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<6>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((((a[5] * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((b[5] * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) / (((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<7>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((((a[6] * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((b[6] * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) / ((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<8>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((((((a[7] * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((b[7] * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) / (((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<9>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((((((a[8] * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((b[8] * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) / ((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<10>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((((((((a[9] * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((b[9] * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) * z + a[9]) / (((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]) * z + b[9]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<11>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((((((((a[10] * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((((b[10] * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) * z + a[9]) * z + a[10]) / ((((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]) * z + b[9]) * z + b[10]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<12>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((((((((((a[11] * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((((b[11] * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) * z + a[9]) * z + a[10]) * z + a[11]) / (((((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]) * z + b[9]) * z + b[10]) * z + b[11]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<13>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((((((((((a[12] * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((((((b[12] * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) * z + a[9]) * z + a[10]) * z + a[11]) * z + a[12]) / ((((((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]) * z + b[9]) * z + b[10]) * z + b[11]) * z + b[12]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<14>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((((((((((((a[13] * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((((((b[13] * x + b[12]) * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((((((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) * z + a[9]) * z + a[10]) * z + a[11]) * z + a[12]) * z + a[13]) / (((((((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]) * z + b[9]) * z + b[10]) * z + b[11]) * z + b[12]) * z + b[13]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<15>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((((((((((((a[14] * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((((((((b[14] * x + b[13]) * x + b[12]) * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((((((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) * z + a[9]) * z + a[10]) * z + a[11]) * z + a[12]) * z + a[13]) * z + a[14]) / ((((((((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]) * z + b[9]) * z + b[10]) * z + b[11]) * z + b[12]) * z + b[13]) * z + b[14]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<16>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((((((((((((((a[15] * x + a[14]) * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((((((((b[15] * x + b[14]) * x + b[13]) * x + b[12]) * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((((((((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) * z + a[9]) * z + a[10]) * z + a[11]) * z + a[12]) * z + a[13]) * z + a[14]) * z + a[15]) / (((((((((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]) * z + b[9]) * z + b[10]) * z + b[11]) * z + b[12]) * z + b[13]) * z + b[14]) * z + b[15]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<17>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((((((((((((((a[16] * x + a[15]) * x + a[14]) * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((((((((((b[16] * x + b[15]) * x + b[14]) * x + b[13]) * x + b[12]) * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((((((((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) * z + a[9]) * z + a[10]) * z + a[11]) * z + a[12]) * z + a[13]) * z + a[14]) * z + a[15]) * z + a[16]) / ((((((((((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]) * z + b[9]) * z + b[10]) * z + b[11]) * z + b[12]) * z + b[13]) * z + b[14]) * z + b[15]) * z + b[16]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<18>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((((((((((((((((a[17] * x + a[16]) * x + a[15]) * x + a[14]) * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((((((((((b[17] * x + b[16]) * x + b[15]) * x + b[14]) * x + b[13]) * x + b[12]) * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((((((((((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) * z + a[9]) * z + a[10]) * z + a[11]) * z + a[12]) * z + a[13]) * z + a[14]) * z + a[15]) * z + a[16]) * z + a[17]) / (((((((((((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]) * z + b[9]) * z + b[10]) * z + b[11]) * z + b[12]) * z + b[13]) * z + b[14]) * z + b[15]) * z + b[16]) * z + b[17]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<19>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((((((((((((((((a[18] * x + a[17]) * x + a[16]) * x + a[15]) * x + a[14]) * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((((((((((((b[18] * x + b[17]) * x + b[16]) * x + b[15]) * x + b[14]) * x + b[13]) * x + b[12]) * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((((((((((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) * z + a[9]) * z + a[10]) * z + a[11]) * z + a[12]) * z + a[13]) * z + a[14]) * z + a[15]) * z + a[16]) * z + a[17]) * z + a[18]) / ((((((((((((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]) * z + b[9]) * z + b[10]) * z + b[11]) * z + b[12]) * z + b[13]) * z + b[14]) * z + b[15]) * z + b[16]) * z + b[17]) * z + b[18]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<20>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((((((((((((((((((a[19] * x + a[18]) * x + a[17]) * x + a[16]) * x + a[15]) * x + a[14]) * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((((((((((((b[19] * x + b[18]) * x + b[17]) * x + b[16]) * x + b[15]) * x + b[14]) * x + b[13]) * x + b[12]) * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((((((((((((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) * z + a[9]) * z + a[10]) * z + a[11]) * z + a[12]) * z + a[13]) * z + a[14]) * z + a[15]) * z + a[16]) * z + a[17]) * z + a[18]) * z + a[19]) / (((((((((((((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]) * z + b[9]) * z + b[10]) * z + b[11]) * z + b[12]) * z + b[13]) * z + b[14]) * z + b[15]) * z + b[16]) * z + b[17]) * z + b[18]) * z + b[19]));
+ }
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_3.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_3.hpp
new file mode 100644
index 00000000000..ac1b785e930
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_3.hpp
@@ -0,0 +1,54 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_RAT_3_HPP
+#define BOOST_MATH_TOOLS_POLY_RAT_3_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T*, const U*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]) / static_cast<V>(b[0]);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<2>*)
+{
+ if(x <= 1)
+ return static_cast<V>((a[1] * x + a[0]) / (b[1] * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((a[0] * z + a[1]) / (b[0] * z + b[1]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<3>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((a[0] * z + a[1]) * z + a[2]) / ((b[0] * z + b[1]) * z + b[2]));
+ }
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_4.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_4.hpp
new file mode 100644
index 00000000000..eeced600f4c
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_4.hpp
@@ -0,0 +1,66 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_RAT_4_HPP
+#define BOOST_MATH_TOOLS_POLY_RAT_4_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T*, const U*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]) / static_cast<V>(b[0]);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<2>*)
+{
+ if(x <= 1)
+ return static_cast<V>((a[1] * x + a[0]) / (b[1] * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((a[0] * z + a[1]) / (b[0] * z + b[1]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<3>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((a[0] * z + a[1]) * z + a[2]) / ((b[0] * z + b[1]) * z + b[2]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<4>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) / (((b[0] * z + b[1]) * z + b[2]) * z + b[3]));
+ }
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_5.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_5.hpp
new file mode 100644
index 00000000000..0479f663763
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_5.hpp
@@ -0,0 +1,78 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_RAT_5_HPP
+#define BOOST_MATH_TOOLS_POLY_RAT_5_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T*, const U*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]) / static_cast<V>(b[0]);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<2>*)
+{
+ if(x <= 1)
+ return static_cast<V>((a[1] * x + a[0]) / (b[1] * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((a[0] * z + a[1]) / (b[0] * z + b[1]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<3>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((a[0] * z + a[1]) * z + a[2]) / ((b[0] * z + b[1]) * z + b[2]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<4>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) / (((b[0] * z + b[1]) * z + b[2]) * z + b[3]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<5>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((a[4] * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((b[4] * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) / ((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]));
+ }
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_6.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_6.hpp
new file mode 100644
index 00000000000..db259968ee9
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_6.hpp
@@ -0,0 +1,90 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_RAT_6_HPP
+#define BOOST_MATH_TOOLS_POLY_RAT_6_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T*, const U*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]) / static_cast<V>(b[0]);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<2>*)
+{
+ if(x <= 1)
+ return static_cast<V>((a[1] * x + a[0]) / (b[1] * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((a[0] * z + a[1]) / (b[0] * z + b[1]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<3>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((a[0] * z + a[1]) * z + a[2]) / ((b[0] * z + b[1]) * z + b[2]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<4>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) / (((b[0] * z + b[1]) * z + b[2]) * z + b[3]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<5>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((a[4] * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((b[4] * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) / ((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<6>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((((a[5] * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((b[5] * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) / (((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]));
+ }
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_7.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_7.hpp
new file mode 100644
index 00000000000..b431fe91ef4
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_7.hpp
@@ -0,0 +1,102 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_RAT_7_HPP
+#define BOOST_MATH_TOOLS_POLY_RAT_7_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T*, const U*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]) / static_cast<V>(b[0]);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<2>*)
+{
+ if(x <= 1)
+ return static_cast<V>((a[1] * x + a[0]) / (b[1] * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((a[0] * z + a[1]) / (b[0] * z + b[1]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<3>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((a[0] * z + a[1]) * z + a[2]) / ((b[0] * z + b[1]) * z + b[2]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<4>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) / (((b[0] * z + b[1]) * z + b[2]) * z + b[3]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<5>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((a[4] * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((b[4] * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) / ((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<6>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((((a[5] * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((b[5] * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) / (((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<7>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((((a[6] * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((b[6] * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) / ((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]));
+ }
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_8.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_8.hpp
new file mode 100644
index 00000000000..5a04a7a343f
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_8.hpp
@@ -0,0 +1,114 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_RAT_8_HPP
+#define BOOST_MATH_TOOLS_POLY_RAT_8_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T*, const U*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]) / static_cast<V>(b[0]);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<2>*)
+{
+ if(x <= 1)
+ return static_cast<V>((a[1] * x + a[0]) / (b[1] * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((a[0] * z + a[1]) / (b[0] * z + b[1]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<3>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((a[0] * z + a[1]) * z + a[2]) / ((b[0] * z + b[1]) * z + b[2]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<4>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) / (((b[0] * z + b[1]) * z + b[2]) * z + b[3]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<5>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((a[4] * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((b[4] * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) / ((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<6>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((((a[5] * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((b[5] * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) / (((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<7>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((((a[6] * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((b[6] * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) / ((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<8>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((((((a[7] * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((b[7] * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) / (((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]));
+ }
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_9.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_9.hpp
new file mode 100644
index 00000000000..4b5465fc4a3
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner1_9.hpp
@@ -0,0 +1,126 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using Horners rule
+#ifndef BOOST_MATH_TOOLS_POLY_RAT_9_HPP
+#define BOOST_MATH_TOOLS_POLY_RAT_9_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T*, const U*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]) / static_cast<V>(b[0]);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<2>*)
+{
+ if(x <= 1)
+ return static_cast<V>((a[1] * x + a[0]) / (b[1] * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((a[0] * z + a[1]) / (b[0] * z + b[1]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<3>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((a[0] * z + a[1]) * z + a[2]) / ((b[0] * z + b[1]) * z + b[2]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<4>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) / (((b[0] * z + b[1]) * z + b[2]) * z + b[3]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<5>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((a[4] * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((b[4] * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) / ((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<6>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((((a[5] * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((b[5] * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) / (((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<7>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((((a[6] * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((b[6] * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) / ((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<8>*)
+{
+ if(x <= 1)
+ return static_cast<V>((((((((a[7] * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((b[7] * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) / (((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<9>*)
+{
+ if(x <= 1)
+ return static_cast<V>(((((((((a[8] * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((b[8] * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0]));
+ else
+ {
+ V z = 1 / x;
+ return static_cast<V>(((((((((a[0] * z + a[1]) * z + a[2]) * z + a[3]) * z + a[4]) * z + a[5]) * z + a[6]) * z + a[7]) * z + a[8]) / ((((((((b[0] * z + b[1]) * z + b[2]) * z + b[3]) * z + b[4]) * z + b[5]) * z + b[6]) * z + b[7]) * z + b[8]));
+ }
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_10.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_10.hpp
new file mode 100644
index 00000000000..e26d2d934fd
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_10.hpp
@@ -0,0 +1,144 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_RAT_EVAL_10_HPP
+#define BOOST_MATH_TOOLS_RAT_EVAL_10_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T*, const U*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]) / static_cast<V>(b[0]);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>((a[1] * x + a[0]) / (b[1] * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<5>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((a[4] * x2 + a[2]) * x2 + a[0] + (a[3] * x2 + a[1]) * x) / ((b[4] * x2 + b[2]) * x2 + b[0] + (b[3] * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((a[0] * z2 + a[2]) * z2 + a[4] + (a[1] * z2 + a[3]) * z) / ((b[0] * z2 + b[2]) * z2 + b[4] + (b[1] * z2 + b[3]) * z));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<6>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((a[5] * x2 + a[3]) * x2 + a[1]) * x + (a[4] * x2 + a[2]) * x2 + a[0]) / (((b[5] * x2 + b[3]) * x2 + b[1]) * x + (b[4] * x2 + b[2]) * x2 + b[0]));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((a[0] * z2 + a[2]) * z2 + a[4]) * z + (a[1] * z2 + a[3]) * z2 + a[5]) / (((b[0] * z2 + b[2]) * z2 + b[4]) * z + (b[1] * z2 + b[3]) * z2 + b[5]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<7>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((a[5] * x2 + a[3]) * x2 + a[1]) * x) / (((b[6] * x2 + b[4]) * x2 + b[2]) * x2 + b[0] + ((b[5] * x2 + b[3]) * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6] + ((a[1] * z2 + a[3]) * z2 + a[5]) * z) / (((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6] + ((b[1] * z2 + b[3]) * z2 + b[5]) * z));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<8>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0]) / ((((b[7] * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x + ((b[6] * x2 + b[4]) * x2 + b[2]) * x2 + b[0]));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z + ((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) / ((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z + ((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<9>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x) / ((((b[8] * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0] + (((b[7] * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8] + (((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z) / ((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8] + (((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<10>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((((a[9] * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + (((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]) / (((((b[9] * x2 + b[7]) * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x + (((b[8] * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0]));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8]) * z + (((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z2 + a[9]) / (((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8]) * z + (((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z2 + b[9]));
+ }
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_11.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_11.hpp
new file mode 100644
index 00000000000..c05e6971972
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_11.hpp
@@ -0,0 +1,160 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_RAT_EVAL_11_HPP
+#define BOOST_MATH_TOOLS_RAT_EVAL_11_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T*, const U*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]) / static_cast<V>(b[0]);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>((a[1] * x + a[0]) / (b[1] * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<5>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((a[4] * x2 + a[2]) * x2 + a[0] + (a[3] * x2 + a[1]) * x) / ((b[4] * x2 + b[2]) * x2 + b[0] + (b[3] * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((a[0] * z2 + a[2]) * z2 + a[4] + (a[1] * z2 + a[3]) * z) / ((b[0] * z2 + b[2]) * z2 + b[4] + (b[1] * z2 + b[3]) * z));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<6>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((a[5] * x2 + a[3]) * x2 + a[1]) * x + (a[4] * x2 + a[2]) * x2 + a[0]) / (((b[5] * x2 + b[3]) * x2 + b[1]) * x + (b[4] * x2 + b[2]) * x2 + b[0]));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((a[0] * z2 + a[2]) * z2 + a[4]) * z + (a[1] * z2 + a[3]) * z2 + a[5]) / (((b[0] * z2 + b[2]) * z2 + b[4]) * z + (b[1] * z2 + b[3]) * z2 + b[5]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<7>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((a[5] * x2 + a[3]) * x2 + a[1]) * x) / (((b[6] * x2 + b[4]) * x2 + b[2]) * x2 + b[0] + ((b[5] * x2 + b[3]) * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6] + ((a[1] * z2 + a[3]) * z2 + a[5]) * z) / (((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6] + ((b[1] * z2 + b[3]) * z2 + b[5]) * z));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<8>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0]) / ((((b[7] * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x + ((b[6] * x2 + b[4]) * x2 + b[2]) * x2 + b[0]));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z + ((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) / ((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z + ((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<9>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x) / ((((b[8] * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0] + (((b[7] * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8] + (((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z) / ((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8] + (((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<10>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((((a[9] * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + (((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]) / (((((b[9] * x2 + b[7]) * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x + (((b[8] * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0]));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8]) * z + (((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z2 + a[9]) / (((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8]) * z + (((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z2 + b[9]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<11>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((((a[10] * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((((a[9] * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x) / (((((b[10] * x2 + b[8]) * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0] + ((((b[9] * x2 + b[7]) * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8]) * z2 + a[10] + ((((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z2 + a[9]) * z) / (((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8]) * z2 + b[10] + ((((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z2 + b[9]) * z));
+ }
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_12.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_12.hpp
new file mode 100644
index 00000000000..4ee3734001a
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_12.hpp
@@ -0,0 +1,176 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_RAT_EVAL_12_HPP
+#define BOOST_MATH_TOOLS_RAT_EVAL_12_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T*, const U*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]) / static_cast<V>(b[0]);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>((a[1] * x + a[0]) / (b[1] * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<5>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((a[4] * x2 + a[2]) * x2 + a[0] + (a[3] * x2 + a[1]) * x) / ((b[4] * x2 + b[2]) * x2 + b[0] + (b[3] * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((a[0] * z2 + a[2]) * z2 + a[4] + (a[1] * z2 + a[3]) * z) / ((b[0] * z2 + b[2]) * z2 + b[4] + (b[1] * z2 + b[3]) * z));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<6>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((a[5] * x2 + a[3]) * x2 + a[1]) * x + (a[4] * x2 + a[2]) * x2 + a[0]) / (((b[5] * x2 + b[3]) * x2 + b[1]) * x + (b[4] * x2 + b[2]) * x2 + b[0]));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((a[0] * z2 + a[2]) * z2 + a[4]) * z + (a[1] * z2 + a[3]) * z2 + a[5]) / (((b[0] * z2 + b[2]) * z2 + b[4]) * z + (b[1] * z2 + b[3]) * z2 + b[5]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<7>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((a[5] * x2 + a[3]) * x2 + a[1]) * x) / (((b[6] * x2 + b[4]) * x2 + b[2]) * x2 + b[0] + ((b[5] * x2 + b[3]) * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6] + ((a[1] * z2 + a[3]) * z2 + a[5]) * z) / (((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6] + ((b[1] * z2 + b[3]) * z2 + b[5]) * z));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<8>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0]) / ((((b[7] * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x + ((b[6] * x2 + b[4]) * x2 + b[2]) * x2 + b[0]));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z + ((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) / ((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z + ((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<9>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x) / ((((b[8] * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0] + (((b[7] * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8] + (((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z) / ((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8] + (((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<10>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((((a[9] * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + (((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]) / (((((b[9] * x2 + b[7]) * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x + (((b[8] * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0]));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8]) * z + (((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z2 + a[9]) / (((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8]) * z + (((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z2 + b[9]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<11>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((((a[10] * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((((a[9] * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x) / (((((b[10] * x2 + b[8]) * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0] + ((((b[9] * x2 + b[7]) * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8]) * z2 + a[10] + ((((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z2 + a[9]) * z) / (((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8]) * z2 + b[10] + ((((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z2 + b[9]) * z));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<12>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((((((a[11] * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((((a[10] * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]) / ((((((b[11] * x2 + b[9]) * x2 + b[7]) * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x + ((((b[10] * x2 + b[8]) * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0]));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8]) * z2 + a[10]) * z + ((((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z2 + a[9]) * z2 + a[11]) / ((((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8]) * z2 + b[10]) * z + ((((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z2 + b[9]) * z2 + b[11]));
+ }
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_13.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_13.hpp
new file mode 100644
index 00000000000..37977a111d8
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_13.hpp
@@ -0,0 +1,192 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_RAT_EVAL_13_HPP
+#define BOOST_MATH_TOOLS_RAT_EVAL_13_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T*, const U*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]) / static_cast<V>(b[0]);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>((a[1] * x + a[0]) / (b[1] * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<5>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((a[4] * x2 + a[2]) * x2 + a[0] + (a[3] * x2 + a[1]) * x) / ((b[4] * x2 + b[2]) * x2 + b[0] + (b[3] * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((a[0] * z2 + a[2]) * z2 + a[4] + (a[1] * z2 + a[3]) * z) / ((b[0] * z2 + b[2]) * z2 + b[4] + (b[1] * z2 + b[3]) * z));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<6>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((a[5] * x2 + a[3]) * x2 + a[1]) * x + (a[4] * x2 + a[2]) * x2 + a[0]) / (((b[5] * x2 + b[3]) * x2 + b[1]) * x + (b[4] * x2 + b[2]) * x2 + b[0]));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((a[0] * z2 + a[2]) * z2 + a[4]) * z + (a[1] * z2 + a[3]) * z2 + a[5]) / (((b[0] * z2 + b[2]) * z2 + b[4]) * z + (b[1] * z2 + b[3]) * z2 + b[5]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<7>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((a[5] * x2 + a[3]) * x2 + a[1]) * x) / (((b[6] * x2 + b[4]) * x2 + b[2]) * x2 + b[0] + ((b[5] * x2 + b[3]) * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6] + ((a[1] * z2 + a[3]) * z2 + a[5]) * z) / (((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6] + ((b[1] * z2 + b[3]) * z2 + b[5]) * z));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<8>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0]) / ((((b[7] * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x + ((b[6] * x2 + b[4]) * x2 + b[2]) * x2 + b[0]));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z + ((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) / ((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z + ((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<9>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x) / ((((b[8] * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0] + (((b[7] * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8] + (((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z) / ((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8] + (((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<10>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((((a[9] * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + (((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]) / (((((b[9] * x2 + b[7]) * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x + (((b[8] * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0]));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8]) * z + (((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z2 + a[9]) / (((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8]) * z + (((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z2 + b[9]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<11>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((((a[10] * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((((a[9] * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x) / (((((b[10] * x2 + b[8]) * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0] + ((((b[9] * x2 + b[7]) * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8]) * z2 + a[10] + ((((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z2 + a[9]) * z) / (((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8]) * z2 + b[10] + ((((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z2 + b[9]) * z));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<12>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((((((a[11] * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((((a[10] * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]) / ((((((b[11] * x2 + b[9]) * x2 + b[7]) * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x + ((((b[10] * x2 + b[8]) * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0]));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8]) * z2 + a[10]) * z + ((((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z2 + a[9]) * z2 + a[11]) / ((((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8]) * z2 + b[10]) * z + ((((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z2 + b[9]) * z2 + b[11]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<13>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((((((a[12] * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((((a[11] * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x) / ((((((b[12] * x2 + b[10]) * x2 + b[8]) * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0] + (((((b[11] * x2 + b[9]) * x2 + b[7]) * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8]) * z2 + a[10]) * z2 + a[12] + (((((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z2 + a[9]) * z2 + a[11]) * z) / ((((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8]) * z2 + b[10]) * z2 + b[12] + (((((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z2 + b[9]) * z2 + b[11]) * z));
+ }
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_14.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_14.hpp
new file mode 100644
index 00000000000..78edfbbe1b6
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_14.hpp
@@ -0,0 +1,208 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_RAT_EVAL_14_HPP
+#define BOOST_MATH_TOOLS_RAT_EVAL_14_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T*, const U*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]) / static_cast<V>(b[0]);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>((a[1] * x + a[0]) / (b[1] * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<5>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((a[4] * x2 + a[2]) * x2 + a[0] + (a[3] * x2 + a[1]) * x) / ((b[4] * x2 + b[2]) * x2 + b[0] + (b[3] * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((a[0] * z2 + a[2]) * z2 + a[4] + (a[1] * z2 + a[3]) * z) / ((b[0] * z2 + b[2]) * z2 + b[4] + (b[1] * z2 + b[3]) * z));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<6>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((a[5] * x2 + a[3]) * x2 + a[1]) * x + (a[4] * x2 + a[2]) * x2 + a[0]) / (((b[5] * x2 + b[3]) * x2 + b[1]) * x + (b[4] * x2 + b[2]) * x2 + b[0]));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((a[0] * z2 + a[2]) * z2 + a[4]) * z + (a[1] * z2 + a[3]) * z2 + a[5]) / (((b[0] * z2 + b[2]) * z2 + b[4]) * z + (b[1] * z2 + b[3]) * z2 + b[5]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<7>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((a[5] * x2 + a[3]) * x2 + a[1]) * x) / (((b[6] * x2 + b[4]) * x2 + b[2]) * x2 + b[0] + ((b[5] * x2 + b[3]) * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6] + ((a[1] * z2 + a[3]) * z2 + a[5]) * z) / (((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6] + ((b[1] * z2 + b[3]) * z2 + b[5]) * z));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<8>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0]) / ((((b[7] * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x + ((b[6] * x2 + b[4]) * x2 + b[2]) * x2 + b[0]));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z + ((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) / ((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z + ((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<9>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x) / ((((b[8] * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0] + (((b[7] * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8] + (((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z) / ((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8] + (((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<10>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((((a[9] * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + (((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]) / (((((b[9] * x2 + b[7]) * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x + (((b[8] * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0]));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8]) * z + (((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z2 + a[9]) / (((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8]) * z + (((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z2 + b[9]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<11>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((((a[10] * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((((a[9] * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x) / (((((b[10] * x2 + b[8]) * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0] + ((((b[9] * x2 + b[7]) * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8]) * z2 + a[10] + ((((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z2 + a[9]) * z) / (((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8]) * z2 + b[10] + ((((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z2 + b[9]) * z));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<12>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((((((a[11] * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((((a[10] * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]) / ((((((b[11] * x2 + b[9]) * x2 + b[7]) * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x + ((((b[10] * x2 + b[8]) * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0]));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8]) * z2 + a[10]) * z + ((((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z2 + a[9]) * z2 + a[11]) / ((((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8]) * z2 + b[10]) * z + ((((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z2 + b[9]) * z2 + b[11]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<13>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((((((a[12] * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((((a[11] * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x) / ((((((b[12] * x2 + b[10]) * x2 + b[8]) * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0] + (((((b[11] * x2 + b[9]) * x2 + b[7]) * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8]) * z2 + a[10]) * z2 + a[12] + (((((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z2 + a[9]) * z2 + a[11]) * z) / ((((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8]) * z2 + b[10]) * z2 + b[12] + (((((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z2 + b[9]) * z2 + b[11]) * z));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<14>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((((((a[13] * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + (((((a[12] * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]) / (((((((b[13] * x2 + b[11]) * x2 + b[9]) * x2 + b[7]) * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x + (((((b[12] * x2 + b[10]) * x2 + b[8]) * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0]));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8]) * z2 + a[10]) * z2 + a[12]) * z + (((((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z2 + a[9]) * z2 + a[11]) * z2 + a[13]) / (((((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8]) * z2 + b[10]) * z2 + b[12]) * z + (((((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z2 + b[9]) * z2 + b[11]) * z2 + b[13]));
+ }
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_15.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_15.hpp
new file mode 100644
index 00000000000..3cf4ef56a0a
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_15.hpp
@@ -0,0 +1,224 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_RAT_EVAL_15_HPP
+#define BOOST_MATH_TOOLS_RAT_EVAL_15_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T*, const U*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]) / static_cast<V>(b[0]);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>((a[1] * x + a[0]) / (b[1] * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<5>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((a[4] * x2 + a[2]) * x2 + a[0] + (a[3] * x2 + a[1]) * x) / ((b[4] * x2 + b[2]) * x2 + b[0] + (b[3] * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((a[0] * z2 + a[2]) * z2 + a[4] + (a[1] * z2 + a[3]) * z) / ((b[0] * z2 + b[2]) * z2 + b[4] + (b[1] * z2 + b[3]) * z));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<6>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((a[5] * x2 + a[3]) * x2 + a[1]) * x + (a[4] * x2 + a[2]) * x2 + a[0]) / (((b[5] * x2 + b[3]) * x2 + b[1]) * x + (b[4] * x2 + b[2]) * x2 + b[0]));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((a[0] * z2 + a[2]) * z2 + a[4]) * z + (a[1] * z2 + a[3]) * z2 + a[5]) / (((b[0] * z2 + b[2]) * z2 + b[4]) * z + (b[1] * z2 + b[3]) * z2 + b[5]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<7>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((a[5] * x2 + a[3]) * x2 + a[1]) * x) / (((b[6] * x2 + b[4]) * x2 + b[2]) * x2 + b[0] + ((b[5] * x2 + b[3]) * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6] + ((a[1] * z2 + a[3]) * z2 + a[5]) * z) / (((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6] + ((b[1] * z2 + b[3]) * z2 + b[5]) * z));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<8>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0]) / ((((b[7] * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x + ((b[6] * x2 + b[4]) * x2 + b[2]) * x2 + b[0]));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z + ((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) / ((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z + ((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<9>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x) / ((((b[8] * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0] + (((b[7] * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8] + (((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z) / ((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8] + (((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<10>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((((a[9] * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + (((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]) / (((((b[9] * x2 + b[7]) * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x + (((b[8] * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0]));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8]) * z + (((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z2 + a[9]) / (((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8]) * z + (((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z2 + b[9]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<11>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((((a[10] * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((((a[9] * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x) / (((((b[10] * x2 + b[8]) * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0] + ((((b[9] * x2 + b[7]) * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8]) * z2 + a[10] + ((((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z2 + a[9]) * z) / (((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8]) * z2 + b[10] + ((((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z2 + b[9]) * z));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<12>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((((((a[11] * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((((a[10] * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]) / ((((((b[11] * x2 + b[9]) * x2 + b[7]) * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x + ((((b[10] * x2 + b[8]) * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0]));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8]) * z2 + a[10]) * z + ((((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z2 + a[9]) * z2 + a[11]) / ((((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8]) * z2 + b[10]) * z + ((((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z2 + b[9]) * z2 + b[11]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<13>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((((((a[12] * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((((a[11] * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x) / ((((((b[12] * x2 + b[10]) * x2 + b[8]) * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0] + (((((b[11] * x2 + b[9]) * x2 + b[7]) * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8]) * z2 + a[10]) * z2 + a[12] + (((((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z2 + a[9]) * z2 + a[11]) * z) / ((((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8]) * z2 + b[10]) * z2 + b[12] + (((((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z2 + b[9]) * z2 + b[11]) * z));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<14>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((((((a[13] * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + (((((a[12] * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]) / (((((((b[13] * x2 + b[11]) * x2 + b[9]) * x2 + b[7]) * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x + (((((b[12] * x2 + b[10]) * x2 + b[8]) * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0]));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8]) * z2 + a[10]) * z2 + a[12]) * z + (((((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z2 + a[9]) * z2 + a[11]) * z2 + a[13]) / (((((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8]) * z2 + b[10]) * z2 + b[12]) * z + (((((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z2 + b[9]) * z2 + b[11]) * z2 + b[13]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<15>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((((((a[14] * x2 + a[12]) * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((((((a[13] * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x) / (((((((b[14] * x2 + b[12]) * x2 + b[10]) * x2 + b[8]) * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0] + ((((((b[13] * x2 + b[11]) * x2 + b[9]) * x2 + b[7]) * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8]) * z2 + a[10]) * z2 + a[12]) * z2 + a[14] + ((((((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z2 + a[9]) * z2 + a[11]) * z2 + a[13]) * z) / (((((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8]) * z2 + b[10]) * z2 + b[12]) * z2 + b[14] + ((((((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z2 + b[9]) * z2 + b[11]) * z2 + b[13]) * z));
+ }
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_16.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_16.hpp
new file mode 100644
index 00000000000..3936a1ba4bd
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_16.hpp
@@ -0,0 +1,240 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_RAT_EVAL_16_HPP
+#define BOOST_MATH_TOOLS_RAT_EVAL_16_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T*, const U*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]) / static_cast<V>(b[0]);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>((a[1] * x + a[0]) / (b[1] * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<5>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((a[4] * x2 + a[2]) * x2 + a[0] + (a[3] * x2 + a[1]) * x) / ((b[4] * x2 + b[2]) * x2 + b[0] + (b[3] * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((a[0] * z2 + a[2]) * z2 + a[4] + (a[1] * z2 + a[3]) * z) / ((b[0] * z2 + b[2]) * z2 + b[4] + (b[1] * z2 + b[3]) * z));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<6>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((a[5] * x2 + a[3]) * x2 + a[1]) * x + (a[4] * x2 + a[2]) * x2 + a[0]) / (((b[5] * x2 + b[3]) * x2 + b[1]) * x + (b[4] * x2 + b[2]) * x2 + b[0]));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((a[0] * z2 + a[2]) * z2 + a[4]) * z + (a[1] * z2 + a[3]) * z2 + a[5]) / (((b[0] * z2 + b[2]) * z2 + b[4]) * z + (b[1] * z2 + b[3]) * z2 + b[5]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<7>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((a[5] * x2 + a[3]) * x2 + a[1]) * x) / (((b[6] * x2 + b[4]) * x2 + b[2]) * x2 + b[0] + ((b[5] * x2 + b[3]) * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6] + ((a[1] * z2 + a[3]) * z2 + a[5]) * z) / (((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6] + ((b[1] * z2 + b[3]) * z2 + b[5]) * z));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<8>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0]) / ((((b[7] * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x + ((b[6] * x2 + b[4]) * x2 + b[2]) * x2 + b[0]));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z + ((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) / ((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z + ((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<9>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x) / ((((b[8] * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0] + (((b[7] * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8] + (((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z) / ((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8] + (((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<10>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((((a[9] * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + (((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]) / (((((b[9] * x2 + b[7]) * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x + (((b[8] * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0]));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8]) * z + (((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z2 + a[9]) / (((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8]) * z + (((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z2 + b[9]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<11>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((((a[10] * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((((a[9] * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x) / (((((b[10] * x2 + b[8]) * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0] + ((((b[9] * x2 + b[7]) * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8]) * z2 + a[10] + ((((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z2 + a[9]) * z) / (((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8]) * z2 + b[10] + ((((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z2 + b[9]) * z));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<12>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((((((a[11] * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((((a[10] * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]) / ((((((b[11] * x2 + b[9]) * x2 + b[7]) * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x + ((((b[10] * x2 + b[8]) * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0]));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8]) * z2 + a[10]) * z + ((((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z2 + a[9]) * z2 + a[11]) / ((((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8]) * z2 + b[10]) * z + ((((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z2 + b[9]) * z2 + b[11]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<13>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((((((a[12] * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((((a[11] * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x) / ((((((b[12] * x2 + b[10]) * x2 + b[8]) * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0] + (((((b[11] * x2 + b[9]) * x2 + b[7]) * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8]) * z2 + a[10]) * z2 + a[12] + (((((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z2 + a[9]) * z2 + a[11]) * z) / ((((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8]) * z2 + b[10]) * z2 + b[12] + (((((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z2 + b[9]) * z2 + b[11]) * z));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<14>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((((((a[13] * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + (((((a[12] * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]) / (((((((b[13] * x2 + b[11]) * x2 + b[9]) * x2 + b[7]) * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x + (((((b[12] * x2 + b[10]) * x2 + b[8]) * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0]));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8]) * z2 + a[10]) * z2 + a[12]) * z + (((((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z2 + a[9]) * z2 + a[11]) * z2 + a[13]) / (((((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8]) * z2 + b[10]) * z2 + b[12]) * z + (((((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z2 + b[9]) * z2 + b[11]) * z2 + b[13]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<15>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((((((a[14] * x2 + a[12]) * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((((((a[13] * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x) / (((((((b[14] * x2 + b[12]) * x2 + b[10]) * x2 + b[8]) * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0] + ((((((b[13] * x2 + b[11]) * x2 + b[9]) * x2 + b[7]) * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8]) * z2 + a[10]) * z2 + a[12]) * z2 + a[14] + ((((((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z2 + a[9]) * z2 + a[11]) * z2 + a[13]) * z) / (((((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8]) * z2 + b[10]) * z2 + b[12]) * z2 + b[14] + ((((((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z2 + b[9]) * z2 + b[11]) * z2 + b[13]) * z));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<16>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((((((((a[15] * x2 + a[13]) * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((((((a[14] * x2 + a[12]) * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]) / ((((((((b[15] * x2 + b[13]) * x2 + b[11]) * x2 + b[9]) * x2 + b[7]) * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x + ((((((b[14] * x2 + b[12]) * x2 + b[10]) * x2 + b[8]) * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0]));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((((((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8]) * z2 + a[10]) * z2 + a[12]) * z2 + a[14]) * z + ((((((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z2 + a[9]) * z2 + a[11]) * z2 + a[13]) * z2 + a[15]) / ((((((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8]) * z2 + b[10]) * z2 + b[12]) * z2 + b[14]) * z + ((((((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z2 + b[9]) * z2 + b[11]) * z2 + b[13]) * z2 + b[15]));
+ }
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_17.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_17.hpp
new file mode 100644
index 00000000000..4d253b95935
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_17.hpp
@@ -0,0 +1,256 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_RAT_EVAL_17_HPP
+#define BOOST_MATH_TOOLS_RAT_EVAL_17_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T*, const U*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]) / static_cast<V>(b[0]);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>((a[1] * x + a[0]) / (b[1] * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<5>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((a[4] * x2 + a[2]) * x2 + a[0] + (a[3] * x2 + a[1]) * x) / ((b[4] * x2 + b[2]) * x2 + b[0] + (b[3] * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((a[0] * z2 + a[2]) * z2 + a[4] + (a[1] * z2 + a[3]) * z) / ((b[0] * z2 + b[2]) * z2 + b[4] + (b[1] * z2 + b[3]) * z));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<6>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((a[5] * x2 + a[3]) * x2 + a[1]) * x + (a[4] * x2 + a[2]) * x2 + a[0]) / (((b[5] * x2 + b[3]) * x2 + b[1]) * x + (b[4] * x2 + b[2]) * x2 + b[0]));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((a[0] * z2 + a[2]) * z2 + a[4]) * z + (a[1] * z2 + a[3]) * z2 + a[5]) / (((b[0] * z2 + b[2]) * z2 + b[4]) * z + (b[1] * z2 + b[3]) * z2 + b[5]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<7>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((a[5] * x2 + a[3]) * x2 + a[1]) * x) / (((b[6] * x2 + b[4]) * x2 + b[2]) * x2 + b[0] + ((b[5] * x2 + b[3]) * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6] + ((a[1] * z2 + a[3]) * z2 + a[5]) * z) / (((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6] + ((b[1] * z2 + b[3]) * z2 + b[5]) * z));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<8>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0]) / ((((b[7] * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x + ((b[6] * x2 + b[4]) * x2 + b[2]) * x2 + b[0]));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z + ((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) / ((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z + ((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<9>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x) / ((((b[8] * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0] + (((b[7] * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8] + (((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z) / ((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8] + (((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<10>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((((a[9] * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + (((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]) / (((((b[9] * x2 + b[7]) * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x + (((b[8] * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0]));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8]) * z + (((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z2 + a[9]) / (((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8]) * z + (((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z2 + b[9]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<11>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((((a[10] * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((((a[9] * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x) / (((((b[10] * x2 + b[8]) * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0] + ((((b[9] * x2 + b[7]) * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8]) * z2 + a[10] + ((((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z2 + a[9]) * z) / (((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8]) * z2 + b[10] + ((((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z2 + b[9]) * z));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<12>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((((((a[11] * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((((a[10] * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]) / ((((((b[11] * x2 + b[9]) * x2 + b[7]) * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x + ((((b[10] * x2 + b[8]) * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0]));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8]) * z2 + a[10]) * z + ((((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z2 + a[9]) * z2 + a[11]) / ((((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8]) * z2 + b[10]) * z + ((((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z2 + b[9]) * z2 + b[11]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<13>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((((((a[12] * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((((a[11] * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x) / ((((((b[12] * x2 + b[10]) * x2 + b[8]) * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0] + (((((b[11] * x2 + b[9]) * x2 + b[7]) * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8]) * z2 + a[10]) * z2 + a[12] + (((((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z2 + a[9]) * z2 + a[11]) * z) / ((((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8]) * z2 + b[10]) * z2 + b[12] + (((((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z2 + b[9]) * z2 + b[11]) * z));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<14>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((((((a[13] * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + (((((a[12] * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]) / (((((((b[13] * x2 + b[11]) * x2 + b[9]) * x2 + b[7]) * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x + (((((b[12] * x2 + b[10]) * x2 + b[8]) * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0]));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8]) * z2 + a[10]) * z2 + a[12]) * z + (((((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z2 + a[9]) * z2 + a[11]) * z2 + a[13]) / (((((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8]) * z2 + b[10]) * z2 + b[12]) * z + (((((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z2 + b[9]) * z2 + b[11]) * z2 + b[13]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<15>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((((((a[14] * x2 + a[12]) * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((((((a[13] * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x) / (((((((b[14] * x2 + b[12]) * x2 + b[10]) * x2 + b[8]) * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0] + ((((((b[13] * x2 + b[11]) * x2 + b[9]) * x2 + b[7]) * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8]) * z2 + a[10]) * z2 + a[12]) * z2 + a[14] + ((((((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z2 + a[9]) * z2 + a[11]) * z2 + a[13]) * z) / (((((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8]) * z2 + b[10]) * z2 + b[12]) * z2 + b[14] + ((((((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z2 + b[9]) * z2 + b[11]) * z2 + b[13]) * z));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<16>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((((((((a[15] * x2 + a[13]) * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((((((a[14] * x2 + a[12]) * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]) / ((((((((b[15] * x2 + b[13]) * x2 + b[11]) * x2 + b[9]) * x2 + b[7]) * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x + ((((((b[14] * x2 + b[12]) * x2 + b[10]) * x2 + b[8]) * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0]));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((((((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8]) * z2 + a[10]) * z2 + a[12]) * z2 + a[14]) * z + ((((((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z2 + a[9]) * z2 + a[11]) * z2 + a[13]) * z2 + a[15]) / ((((((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8]) * z2 + b[10]) * z2 + b[12]) * z2 + b[14]) * z + ((((((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z2 + b[9]) * z2 + b[11]) * z2 + b[13]) * z2 + b[15]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<17>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((((((((a[16] * x2 + a[14]) * x2 + a[12]) * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((((((a[15] * x2 + a[13]) * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x) / ((((((((b[16] * x2 + b[14]) * x2 + b[12]) * x2 + b[10]) * x2 + b[8]) * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0] + (((((((b[15] * x2 + b[13]) * x2 + b[11]) * x2 + b[9]) * x2 + b[7]) * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((((((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8]) * z2 + a[10]) * z2 + a[12]) * z2 + a[14]) * z2 + a[16] + (((((((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z2 + a[9]) * z2 + a[11]) * z2 + a[13]) * z2 + a[15]) * z) / ((((((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8]) * z2 + b[10]) * z2 + b[12]) * z2 + b[14]) * z2 + b[16] + (((((((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z2 + b[9]) * z2 + b[11]) * z2 + b[13]) * z2 + b[15]) * z));
+ }
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_18.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_18.hpp
new file mode 100644
index 00000000000..6c213ecfb0c
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_18.hpp
@@ -0,0 +1,272 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_RAT_EVAL_18_HPP
+#define BOOST_MATH_TOOLS_RAT_EVAL_18_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T*, const U*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]) / static_cast<V>(b[0]);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>((a[1] * x + a[0]) / (b[1] * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<5>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((a[4] * x2 + a[2]) * x2 + a[0] + (a[3] * x2 + a[1]) * x) / ((b[4] * x2 + b[2]) * x2 + b[0] + (b[3] * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((a[0] * z2 + a[2]) * z2 + a[4] + (a[1] * z2 + a[3]) * z) / ((b[0] * z2 + b[2]) * z2 + b[4] + (b[1] * z2 + b[3]) * z));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<6>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((a[5] * x2 + a[3]) * x2 + a[1]) * x + (a[4] * x2 + a[2]) * x2 + a[0]) / (((b[5] * x2 + b[3]) * x2 + b[1]) * x + (b[4] * x2 + b[2]) * x2 + b[0]));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((a[0] * z2 + a[2]) * z2 + a[4]) * z + (a[1] * z2 + a[3]) * z2 + a[5]) / (((b[0] * z2 + b[2]) * z2 + b[4]) * z + (b[1] * z2 + b[3]) * z2 + b[5]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<7>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((a[5] * x2 + a[3]) * x2 + a[1]) * x) / (((b[6] * x2 + b[4]) * x2 + b[2]) * x2 + b[0] + ((b[5] * x2 + b[3]) * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6] + ((a[1] * z2 + a[3]) * z2 + a[5]) * z) / (((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6] + ((b[1] * z2 + b[3]) * z2 + b[5]) * z));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<8>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0]) / ((((b[7] * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x + ((b[6] * x2 + b[4]) * x2 + b[2]) * x2 + b[0]));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z + ((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) / ((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z + ((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<9>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x) / ((((b[8] * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0] + (((b[7] * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8] + (((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z) / ((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8] + (((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<10>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((((a[9] * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + (((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]) / (((((b[9] * x2 + b[7]) * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x + (((b[8] * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0]));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8]) * z + (((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z2 + a[9]) / (((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8]) * z + (((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z2 + b[9]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<11>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((((a[10] * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((((a[9] * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x) / (((((b[10] * x2 + b[8]) * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0] + ((((b[9] * x2 + b[7]) * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8]) * z2 + a[10] + ((((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z2 + a[9]) * z) / (((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8]) * z2 + b[10] + ((((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z2 + b[9]) * z));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<12>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((((((a[11] * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((((a[10] * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]) / ((((((b[11] * x2 + b[9]) * x2 + b[7]) * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x + ((((b[10] * x2 + b[8]) * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0]));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8]) * z2 + a[10]) * z + ((((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z2 + a[9]) * z2 + a[11]) / ((((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8]) * z2 + b[10]) * z + ((((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z2 + b[9]) * z2 + b[11]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<13>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((((((a[12] * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((((a[11] * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x) / ((((((b[12] * x2 + b[10]) * x2 + b[8]) * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0] + (((((b[11] * x2 + b[9]) * x2 + b[7]) * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8]) * z2 + a[10]) * z2 + a[12] + (((((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z2 + a[9]) * z2 + a[11]) * z) / ((((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8]) * z2 + b[10]) * z2 + b[12] + (((((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z2 + b[9]) * z2 + b[11]) * z));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<14>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((((((a[13] * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + (((((a[12] * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]) / (((((((b[13] * x2 + b[11]) * x2 + b[9]) * x2 + b[7]) * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x + (((((b[12] * x2 + b[10]) * x2 + b[8]) * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0]));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8]) * z2 + a[10]) * z2 + a[12]) * z + (((((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z2 + a[9]) * z2 + a[11]) * z2 + a[13]) / (((((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8]) * z2 + b[10]) * z2 + b[12]) * z + (((((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z2 + b[9]) * z2 + b[11]) * z2 + b[13]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<15>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((((((a[14] * x2 + a[12]) * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((((((a[13] * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x) / (((((((b[14] * x2 + b[12]) * x2 + b[10]) * x2 + b[8]) * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0] + ((((((b[13] * x2 + b[11]) * x2 + b[9]) * x2 + b[7]) * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8]) * z2 + a[10]) * z2 + a[12]) * z2 + a[14] + ((((((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z2 + a[9]) * z2 + a[11]) * z2 + a[13]) * z) / (((((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8]) * z2 + b[10]) * z2 + b[12]) * z2 + b[14] + ((((((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z2 + b[9]) * z2 + b[11]) * z2 + b[13]) * z));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<16>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((((((((a[15] * x2 + a[13]) * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((((((a[14] * x2 + a[12]) * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]) / ((((((((b[15] * x2 + b[13]) * x2 + b[11]) * x2 + b[9]) * x2 + b[7]) * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x + ((((((b[14] * x2 + b[12]) * x2 + b[10]) * x2 + b[8]) * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0]));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((((((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8]) * z2 + a[10]) * z2 + a[12]) * z2 + a[14]) * z + ((((((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z2 + a[9]) * z2 + a[11]) * z2 + a[13]) * z2 + a[15]) / ((((((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8]) * z2 + b[10]) * z2 + b[12]) * z2 + b[14]) * z + ((((((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z2 + b[9]) * z2 + b[11]) * z2 + b[13]) * z2 + b[15]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<17>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((((((((a[16] * x2 + a[14]) * x2 + a[12]) * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((((((a[15] * x2 + a[13]) * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x) / ((((((((b[16] * x2 + b[14]) * x2 + b[12]) * x2 + b[10]) * x2 + b[8]) * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0] + (((((((b[15] * x2 + b[13]) * x2 + b[11]) * x2 + b[9]) * x2 + b[7]) * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((((((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8]) * z2 + a[10]) * z2 + a[12]) * z2 + a[14]) * z2 + a[16] + (((((((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z2 + a[9]) * z2 + a[11]) * z2 + a[13]) * z2 + a[15]) * z) / ((((((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8]) * z2 + b[10]) * z2 + b[12]) * z2 + b[14]) * z2 + b[16] + (((((((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z2 + b[9]) * z2 + b[11]) * z2 + b[13]) * z2 + b[15]) * z));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<18>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((((((((a[17] * x2 + a[15]) * x2 + a[13]) * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + (((((((a[16] * x2 + a[14]) * x2 + a[12]) * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]) / (((((((((b[17] * x2 + b[15]) * x2 + b[13]) * x2 + b[11]) * x2 + b[9]) * x2 + b[7]) * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x + (((((((b[16] * x2 + b[14]) * x2 + b[12]) * x2 + b[10]) * x2 + b[8]) * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0]));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((((((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8]) * z2 + a[10]) * z2 + a[12]) * z2 + a[14]) * z2 + a[16]) * z + (((((((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z2 + a[9]) * z2 + a[11]) * z2 + a[13]) * z2 + a[15]) * z2 + a[17]) / (((((((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8]) * z2 + b[10]) * z2 + b[12]) * z2 + b[14]) * z2 + b[16]) * z + (((((((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z2 + b[9]) * z2 + b[11]) * z2 + b[13]) * z2 + b[15]) * z2 + b[17]));
+ }
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_19.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_19.hpp
new file mode 100644
index 00000000000..88e0b9ff015
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_19.hpp
@@ -0,0 +1,288 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_RAT_EVAL_19_HPP
+#define BOOST_MATH_TOOLS_RAT_EVAL_19_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T*, const U*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]) / static_cast<V>(b[0]);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>((a[1] * x + a[0]) / (b[1] * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<5>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((a[4] * x2 + a[2]) * x2 + a[0] + (a[3] * x2 + a[1]) * x) / ((b[4] * x2 + b[2]) * x2 + b[0] + (b[3] * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((a[0] * z2 + a[2]) * z2 + a[4] + (a[1] * z2 + a[3]) * z) / ((b[0] * z2 + b[2]) * z2 + b[4] + (b[1] * z2 + b[3]) * z));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<6>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((a[5] * x2 + a[3]) * x2 + a[1]) * x + (a[4] * x2 + a[2]) * x2 + a[0]) / (((b[5] * x2 + b[3]) * x2 + b[1]) * x + (b[4] * x2 + b[2]) * x2 + b[0]));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((a[0] * z2 + a[2]) * z2 + a[4]) * z + (a[1] * z2 + a[3]) * z2 + a[5]) / (((b[0] * z2 + b[2]) * z2 + b[4]) * z + (b[1] * z2 + b[3]) * z2 + b[5]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<7>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((a[5] * x2 + a[3]) * x2 + a[1]) * x) / (((b[6] * x2 + b[4]) * x2 + b[2]) * x2 + b[0] + ((b[5] * x2 + b[3]) * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6] + ((a[1] * z2 + a[3]) * z2 + a[5]) * z) / (((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6] + ((b[1] * z2 + b[3]) * z2 + b[5]) * z));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<8>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0]) / ((((b[7] * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x + ((b[6] * x2 + b[4]) * x2 + b[2]) * x2 + b[0]));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z + ((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) / ((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z + ((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<9>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x) / ((((b[8] * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0] + (((b[7] * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8] + (((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z) / ((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8] + (((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<10>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((((a[9] * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + (((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]) / (((((b[9] * x2 + b[7]) * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x + (((b[8] * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0]));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8]) * z + (((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z2 + a[9]) / (((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8]) * z + (((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z2 + b[9]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<11>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((((a[10] * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((((a[9] * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x) / (((((b[10] * x2 + b[8]) * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0] + ((((b[9] * x2 + b[7]) * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8]) * z2 + a[10] + ((((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z2 + a[9]) * z) / (((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8]) * z2 + b[10] + ((((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z2 + b[9]) * z));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<12>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((((((a[11] * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((((a[10] * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]) / ((((((b[11] * x2 + b[9]) * x2 + b[7]) * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x + ((((b[10] * x2 + b[8]) * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0]));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8]) * z2 + a[10]) * z + ((((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z2 + a[9]) * z2 + a[11]) / ((((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8]) * z2 + b[10]) * z + ((((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z2 + b[9]) * z2 + b[11]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<13>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((((((a[12] * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((((a[11] * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x) / ((((((b[12] * x2 + b[10]) * x2 + b[8]) * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0] + (((((b[11] * x2 + b[9]) * x2 + b[7]) * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8]) * z2 + a[10]) * z2 + a[12] + (((((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z2 + a[9]) * z2 + a[11]) * z) / ((((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8]) * z2 + b[10]) * z2 + b[12] + (((((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z2 + b[9]) * z2 + b[11]) * z));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<14>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((((((a[13] * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + (((((a[12] * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]) / (((((((b[13] * x2 + b[11]) * x2 + b[9]) * x2 + b[7]) * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x + (((((b[12] * x2 + b[10]) * x2 + b[8]) * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0]));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8]) * z2 + a[10]) * z2 + a[12]) * z + (((((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z2 + a[9]) * z2 + a[11]) * z2 + a[13]) / (((((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8]) * z2 + b[10]) * z2 + b[12]) * z + (((((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z2 + b[9]) * z2 + b[11]) * z2 + b[13]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<15>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((((((a[14] * x2 + a[12]) * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((((((a[13] * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x) / (((((((b[14] * x2 + b[12]) * x2 + b[10]) * x2 + b[8]) * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0] + ((((((b[13] * x2 + b[11]) * x2 + b[9]) * x2 + b[7]) * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8]) * z2 + a[10]) * z2 + a[12]) * z2 + a[14] + ((((((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z2 + a[9]) * z2 + a[11]) * z2 + a[13]) * z) / (((((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8]) * z2 + b[10]) * z2 + b[12]) * z2 + b[14] + ((((((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z2 + b[9]) * z2 + b[11]) * z2 + b[13]) * z));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<16>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((((((((a[15] * x2 + a[13]) * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((((((a[14] * x2 + a[12]) * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]) / ((((((((b[15] * x2 + b[13]) * x2 + b[11]) * x2 + b[9]) * x2 + b[7]) * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x + ((((((b[14] * x2 + b[12]) * x2 + b[10]) * x2 + b[8]) * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0]));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((((((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8]) * z2 + a[10]) * z2 + a[12]) * z2 + a[14]) * z + ((((((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z2 + a[9]) * z2 + a[11]) * z2 + a[13]) * z2 + a[15]) / ((((((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8]) * z2 + b[10]) * z2 + b[12]) * z2 + b[14]) * z + ((((((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z2 + b[9]) * z2 + b[11]) * z2 + b[13]) * z2 + b[15]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<17>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((((((((a[16] * x2 + a[14]) * x2 + a[12]) * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((((((a[15] * x2 + a[13]) * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x) / ((((((((b[16] * x2 + b[14]) * x2 + b[12]) * x2 + b[10]) * x2 + b[8]) * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0] + (((((((b[15] * x2 + b[13]) * x2 + b[11]) * x2 + b[9]) * x2 + b[7]) * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((((((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8]) * z2 + a[10]) * z2 + a[12]) * z2 + a[14]) * z2 + a[16] + (((((((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z2 + a[9]) * z2 + a[11]) * z2 + a[13]) * z2 + a[15]) * z) / ((((((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8]) * z2 + b[10]) * z2 + b[12]) * z2 + b[14]) * z2 + b[16] + (((((((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z2 + b[9]) * z2 + b[11]) * z2 + b[13]) * z2 + b[15]) * z));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<18>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((((((((a[17] * x2 + a[15]) * x2 + a[13]) * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + (((((((a[16] * x2 + a[14]) * x2 + a[12]) * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]) / (((((((((b[17] * x2 + b[15]) * x2 + b[13]) * x2 + b[11]) * x2 + b[9]) * x2 + b[7]) * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x + (((((((b[16] * x2 + b[14]) * x2 + b[12]) * x2 + b[10]) * x2 + b[8]) * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0]));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((((((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8]) * z2 + a[10]) * z2 + a[12]) * z2 + a[14]) * z2 + a[16]) * z + (((((((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z2 + a[9]) * z2 + a[11]) * z2 + a[13]) * z2 + a[15]) * z2 + a[17]) / (((((((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8]) * z2 + b[10]) * z2 + b[12]) * z2 + b[14]) * z2 + b[16]) * z + (((((((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z2 + b[9]) * z2 + b[11]) * z2 + b[13]) * z2 + b[15]) * z2 + b[17]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<19>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((((((((a[18] * x2 + a[16]) * x2 + a[14]) * x2 + a[12]) * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((((((((a[17] * x2 + a[15]) * x2 + a[13]) * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x) / (((((((((b[18] * x2 + b[16]) * x2 + b[14]) * x2 + b[12]) * x2 + b[10]) * x2 + b[8]) * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0] + ((((((((b[17] * x2 + b[15]) * x2 + b[13]) * x2 + b[11]) * x2 + b[9]) * x2 + b[7]) * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((((((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8]) * z2 + a[10]) * z2 + a[12]) * z2 + a[14]) * z2 + a[16]) * z2 + a[18] + ((((((((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z2 + a[9]) * z2 + a[11]) * z2 + a[13]) * z2 + a[15]) * z2 + a[17]) * z) / (((((((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8]) * z2 + b[10]) * z2 + b[12]) * z2 + b[14]) * z2 + b[16]) * z2 + b[18] + ((((((((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z2 + b[9]) * z2 + b[11]) * z2 + b[13]) * z2 + b[15]) * z2 + b[17]) * z));
+ }
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_2.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_2.hpp
new file mode 100644
index 00000000000..35b5abb3546
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_2.hpp
@@ -0,0 +1,48 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_RAT_EVAL_2_HPP
+#define BOOST_MATH_TOOLS_RAT_EVAL_2_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T*, const U*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]) / static_cast<V>(b[0]);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>((a[1] * x + a[0]) / (b[1] * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0]));
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_20.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_20.hpp
new file mode 100644
index 00000000000..dc73fdd58ed
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_20.hpp
@@ -0,0 +1,304 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_RAT_EVAL_20_HPP
+#define BOOST_MATH_TOOLS_RAT_EVAL_20_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T*, const U*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]) / static_cast<V>(b[0]);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>((a[1] * x + a[0]) / (b[1] * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<5>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((a[4] * x2 + a[2]) * x2 + a[0] + (a[3] * x2 + a[1]) * x) / ((b[4] * x2 + b[2]) * x2 + b[0] + (b[3] * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((a[0] * z2 + a[2]) * z2 + a[4] + (a[1] * z2 + a[3]) * z) / ((b[0] * z2 + b[2]) * z2 + b[4] + (b[1] * z2 + b[3]) * z));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<6>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((a[5] * x2 + a[3]) * x2 + a[1]) * x + (a[4] * x2 + a[2]) * x2 + a[0]) / (((b[5] * x2 + b[3]) * x2 + b[1]) * x + (b[4] * x2 + b[2]) * x2 + b[0]));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((a[0] * z2 + a[2]) * z2 + a[4]) * z + (a[1] * z2 + a[3]) * z2 + a[5]) / (((b[0] * z2 + b[2]) * z2 + b[4]) * z + (b[1] * z2 + b[3]) * z2 + b[5]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<7>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((a[5] * x2 + a[3]) * x2 + a[1]) * x) / (((b[6] * x2 + b[4]) * x2 + b[2]) * x2 + b[0] + ((b[5] * x2 + b[3]) * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6] + ((a[1] * z2 + a[3]) * z2 + a[5]) * z) / (((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6] + ((b[1] * z2 + b[3]) * z2 + b[5]) * z));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<8>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0]) / ((((b[7] * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x + ((b[6] * x2 + b[4]) * x2 + b[2]) * x2 + b[0]));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z + ((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) / ((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z + ((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<9>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x) / ((((b[8] * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0] + (((b[7] * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8] + (((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z) / ((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8] + (((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<10>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((((a[9] * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + (((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]) / (((((b[9] * x2 + b[7]) * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x + (((b[8] * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0]));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8]) * z + (((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z2 + a[9]) / (((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8]) * z + (((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z2 + b[9]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<11>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((((a[10] * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((((a[9] * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x) / (((((b[10] * x2 + b[8]) * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0] + ((((b[9] * x2 + b[7]) * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8]) * z2 + a[10] + ((((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z2 + a[9]) * z) / (((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8]) * z2 + b[10] + ((((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z2 + b[9]) * z));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<12>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((((((a[11] * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((((a[10] * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]) / ((((((b[11] * x2 + b[9]) * x2 + b[7]) * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x + ((((b[10] * x2 + b[8]) * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0]));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8]) * z2 + a[10]) * z + ((((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z2 + a[9]) * z2 + a[11]) / ((((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8]) * z2 + b[10]) * z + ((((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z2 + b[9]) * z2 + b[11]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<13>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((((((a[12] * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((((a[11] * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x) / ((((((b[12] * x2 + b[10]) * x2 + b[8]) * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0] + (((((b[11] * x2 + b[9]) * x2 + b[7]) * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8]) * z2 + a[10]) * z2 + a[12] + (((((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z2 + a[9]) * z2 + a[11]) * z) / ((((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8]) * z2 + b[10]) * z2 + b[12] + (((((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z2 + b[9]) * z2 + b[11]) * z));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<14>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((((((a[13] * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + (((((a[12] * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]) / (((((((b[13] * x2 + b[11]) * x2 + b[9]) * x2 + b[7]) * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x + (((((b[12] * x2 + b[10]) * x2 + b[8]) * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0]));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8]) * z2 + a[10]) * z2 + a[12]) * z + (((((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z2 + a[9]) * z2 + a[11]) * z2 + a[13]) / (((((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8]) * z2 + b[10]) * z2 + b[12]) * z + (((((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z2 + b[9]) * z2 + b[11]) * z2 + b[13]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<15>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((((((a[14] * x2 + a[12]) * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((((((a[13] * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x) / (((((((b[14] * x2 + b[12]) * x2 + b[10]) * x2 + b[8]) * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0] + ((((((b[13] * x2 + b[11]) * x2 + b[9]) * x2 + b[7]) * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8]) * z2 + a[10]) * z2 + a[12]) * z2 + a[14] + ((((((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z2 + a[9]) * z2 + a[11]) * z2 + a[13]) * z) / (((((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8]) * z2 + b[10]) * z2 + b[12]) * z2 + b[14] + ((((((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z2 + b[9]) * z2 + b[11]) * z2 + b[13]) * z));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<16>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((((((((a[15] * x2 + a[13]) * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((((((a[14] * x2 + a[12]) * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]) / ((((((((b[15] * x2 + b[13]) * x2 + b[11]) * x2 + b[9]) * x2 + b[7]) * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x + ((((((b[14] * x2 + b[12]) * x2 + b[10]) * x2 + b[8]) * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0]));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((((((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8]) * z2 + a[10]) * z2 + a[12]) * z2 + a[14]) * z + ((((((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z2 + a[9]) * z2 + a[11]) * z2 + a[13]) * z2 + a[15]) / ((((((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8]) * z2 + b[10]) * z2 + b[12]) * z2 + b[14]) * z + ((((((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z2 + b[9]) * z2 + b[11]) * z2 + b[13]) * z2 + b[15]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<17>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((((((((a[16] * x2 + a[14]) * x2 + a[12]) * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((((((a[15] * x2 + a[13]) * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x) / ((((((((b[16] * x2 + b[14]) * x2 + b[12]) * x2 + b[10]) * x2 + b[8]) * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0] + (((((((b[15] * x2 + b[13]) * x2 + b[11]) * x2 + b[9]) * x2 + b[7]) * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((((((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8]) * z2 + a[10]) * z2 + a[12]) * z2 + a[14]) * z2 + a[16] + (((((((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z2 + a[9]) * z2 + a[11]) * z2 + a[13]) * z2 + a[15]) * z) / ((((((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8]) * z2 + b[10]) * z2 + b[12]) * z2 + b[14]) * z2 + b[16] + (((((((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z2 + b[9]) * z2 + b[11]) * z2 + b[13]) * z2 + b[15]) * z));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<18>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((((((((a[17] * x2 + a[15]) * x2 + a[13]) * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + (((((((a[16] * x2 + a[14]) * x2 + a[12]) * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]) / (((((((((b[17] * x2 + b[15]) * x2 + b[13]) * x2 + b[11]) * x2 + b[9]) * x2 + b[7]) * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x + (((((((b[16] * x2 + b[14]) * x2 + b[12]) * x2 + b[10]) * x2 + b[8]) * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0]));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((((((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8]) * z2 + a[10]) * z2 + a[12]) * z2 + a[14]) * z2 + a[16]) * z + (((((((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z2 + a[9]) * z2 + a[11]) * z2 + a[13]) * z2 + a[15]) * z2 + a[17]) / (((((((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8]) * z2 + b[10]) * z2 + b[12]) * z2 + b[14]) * z2 + b[16]) * z + (((((((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z2 + b[9]) * z2 + b[11]) * z2 + b[13]) * z2 + b[15]) * z2 + b[17]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<19>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((((((((a[18] * x2 + a[16]) * x2 + a[14]) * x2 + a[12]) * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((((((((a[17] * x2 + a[15]) * x2 + a[13]) * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x) / (((((((((b[18] * x2 + b[16]) * x2 + b[14]) * x2 + b[12]) * x2 + b[10]) * x2 + b[8]) * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0] + ((((((((b[17] * x2 + b[15]) * x2 + b[13]) * x2 + b[11]) * x2 + b[9]) * x2 + b[7]) * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((((((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8]) * z2 + a[10]) * z2 + a[12]) * z2 + a[14]) * z2 + a[16]) * z2 + a[18] + ((((((((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z2 + a[9]) * z2 + a[11]) * z2 + a[13]) * z2 + a[15]) * z2 + a[17]) * z) / (((((((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8]) * z2 + b[10]) * z2 + b[12]) * z2 + b[14]) * z2 + b[16]) * z2 + b[18] + ((((((((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z2 + b[9]) * z2 + b[11]) * z2 + b[13]) * z2 + b[15]) * z2 + b[17]) * z));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<20>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((((((((((a[19] * x2 + a[17]) * x2 + a[15]) * x2 + a[13]) * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((((((((a[18] * x2 + a[16]) * x2 + a[14]) * x2 + a[12]) * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]) / ((((((((((b[19] * x2 + b[17]) * x2 + b[15]) * x2 + b[13]) * x2 + b[11]) * x2 + b[9]) * x2 + b[7]) * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x + ((((((((b[18] * x2 + b[16]) * x2 + b[14]) * x2 + b[12]) * x2 + b[10]) * x2 + b[8]) * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0]));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((((((((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8]) * z2 + a[10]) * z2 + a[12]) * z2 + a[14]) * z2 + a[16]) * z2 + a[18]) * z + ((((((((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z2 + a[9]) * z2 + a[11]) * z2 + a[13]) * z2 + a[15]) * z2 + a[17]) * z2 + a[19]) / ((((((((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8]) * z2 + b[10]) * z2 + b[12]) * z2 + b[14]) * z2 + b[16]) * z2 + b[18]) * z + ((((((((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z2 + b[9]) * z2 + b[11]) * z2 + b[13]) * z2 + b[15]) * z2 + b[17]) * z2 + b[19]));
+ }
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_3.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_3.hpp
new file mode 100644
index 00000000000..8838ac13e61
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_3.hpp
@@ -0,0 +1,48 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_RAT_EVAL_3_HPP
+#define BOOST_MATH_TOOLS_RAT_EVAL_3_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T*, const U*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]) / static_cast<V>(b[0]);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>((a[1] * x + a[0]) / (b[1] * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0]));
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_4.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_4.hpp
new file mode 100644
index 00000000000..5fe5ada83b6
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_4.hpp
@@ -0,0 +1,48 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_RAT_EVAL_4_HPP
+#define BOOST_MATH_TOOLS_RAT_EVAL_4_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T*, const U*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]) / static_cast<V>(b[0]);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>((a[1] * x + a[0]) / (b[1] * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0]));
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_5.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_5.hpp
new file mode 100644
index 00000000000..48b8498bc70
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_5.hpp
@@ -0,0 +1,64 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_RAT_EVAL_5_HPP
+#define BOOST_MATH_TOOLS_RAT_EVAL_5_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T*, const U*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]) / static_cast<V>(b[0]);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>((a[1] * x + a[0]) / (b[1] * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<5>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((a[4] * x2 + a[2]) * x2 + a[0] + (a[3] * x2 + a[1]) * x) / ((b[4] * x2 + b[2]) * x2 + b[0] + (b[3] * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((a[0] * z2 + a[2]) * z2 + a[4] + (a[1] * z2 + a[3]) * z) / ((b[0] * z2 + b[2]) * z2 + b[4] + (b[1] * z2 + b[3]) * z));
+ }
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_6.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_6.hpp
new file mode 100644
index 00000000000..83631eaf510
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_6.hpp
@@ -0,0 +1,80 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_RAT_EVAL_6_HPP
+#define BOOST_MATH_TOOLS_RAT_EVAL_6_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T*, const U*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]) / static_cast<V>(b[0]);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>((a[1] * x + a[0]) / (b[1] * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<5>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((a[4] * x2 + a[2]) * x2 + a[0] + (a[3] * x2 + a[1]) * x) / ((b[4] * x2 + b[2]) * x2 + b[0] + (b[3] * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((a[0] * z2 + a[2]) * z2 + a[4] + (a[1] * z2 + a[3]) * z) / ((b[0] * z2 + b[2]) * z2 + b[4] + (b[1] * z2 + b[3]) * z));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<6>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((a[5] * x2 + a[3]) * x2 + a[1]) * x + (a[4] * x2 + a[2]) * x2 + a[0]) / (((b[5] * x2 + b[3]) * x2 + b[1]) * x + (b[4] * x2 + b[2]) * x2 + b[0]));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((a[0] * z2 + a[2]) * z2 + a[4]) * z + (a[1] * z2 + a[3]) * z2 + a[5]) / (((b[0] * z2 + b[2]) * z2 + b[4]) * z + (b[1] * z2 + b[3]) * z2 + b[5]));
+ }
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_7.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_7.hpp
new file mode 100644
index 00000000000..3ed86eafcd3
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_7.hpp
@@ -0,0 +1,96 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_RAT_EVAL_7_HPP
+#define BOOST_MATH_TOOLS_RAT_EVAL_7_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T*, const U*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]) / static_cast<V>(b[0]);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>((a[1] * x + a[0]) / (b[1] * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<5>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((a[4] * x2 + a[2]) * x2 + a[0] + (a[3] * x2 + a[1]) * x) / ((b[4] * x2 + b[2]) * x2 + b[0] + (b[3] * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((a[0] * z2 + a[2]) * z2 + a[4] + (a[1] * z2 + a[3]) * z) / ((b[0] * z2 + b[2]) * z2 + b[4] + (b[1] * z2 + b[3]) * z));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<6>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((a[5] * x2 + a[3]) * x2 + a[1]) * x + (a[4] * x2 + a[2]) * x2 + a[0]) / (((b[5] * x2 + b[3]) * x2 + b[1]) * x + (b[4] * x2 + b[2]) * x2 + b[0]));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((a[0] * z2 + a[2]) * z2 + a[4]) * z + (a[1] * z2 + a[3]) * z2 + a[5]) / (((b[0] * z2 + b[2]) * z2 + b[4]) * z + (b[1] * z2 + b[3]) * z2 + b[5]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<7>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((a[5] * x2 + a[3]) * x2 + a[1]) * x) / (((b[6] * x2 + b[4]) * x2 + b[2]) * x2 + b[0] + ((b[5] * x2 + b[3]) * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6] + ((a[1] * z2 + a[3]) * z2 + a[5]) * z) / (((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6] + ((b[1] * z2 + b[3]) * z2 + b[5]) * z));
+ }
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_8.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_8.hpp
new file mode 100644
index 00000000000..f8b36ece4a2
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_8.hpp
@@ -0,0 +1,112 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_RAT_EVAL_8_HPP
+#define BOOST_MATH_TOOLS_RAT_EVAL_8_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T*, const U*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]) / static_cast<V>(b[0]);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>((a[1] * x + a[0]) / (b[1] * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<5>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((a[4] * x2 + a[2]) * x2 + a[0] + (a[3] * x2 + a[1]) * x) / ((b[4] * x2 + b[2]) * x2 + b[0] + (b[3] * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((a[0] * z2 + a[2]) * z2 + a[4] + (a[1] * z2 + a[3]) * z) / ((b[0] * z2 + b[2]) * z2 + b[4] + (b[1] * z2 + b[3]) * z));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<6>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((a[5] * x2 + a[3]) * x2 + a[1]) * x + (a[4] * x2 + a[2]) * x2 + a[0]) / (((b[5] * x2 + b[3]) * x2 + b[1]) * x + (b[4] * x2 + b[2]) * x2 + b[0]));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((a[0] * z2 + a[2]) * z2 + a[4]) * z + (a[1] * z2 + a[3]) * z2 + a[5]) / (((b[0] * z2 + b[2]) * z2 + b[4]) * z + (b[1] * z2 + b[3]) * z2 + b[5]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<7>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((a[5] * x2 + a[3]) * x2 + a[1]) * x) / (((b[6] * x2 + b[4]) * x2 + b[2]) * x2 + b[0] + ((b[5] * x2 + b[3]) * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6] + ((a[1] * z2 + a[3]) * z2 + a[5]) * z) / (((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6] + ((b[1] * z2 + b[3]) * z2 + b[5]) * z));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<8>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0]) / ((((b[7] * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x + ((b[6] * x2 + b[4]) * x2 + b[2]) * x2 + b[0]));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z + ((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) / ((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z + ((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]));
+ }
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_9.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_9.hpp
new file mode 100644
index 00000000000..88cc4e5fcf7
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner2_9.hpp
@@ -0,0 +1,128 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_RAT_EVAL_9_HPP
+#define BOOST_MATH_TOOLS_RAT_EVAL_9_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T*, const U*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]) / static_cast<V>(b[0]);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>((a[1] * x + a[0]) / (b[1] * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<5>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((a[4] * x2 + a[2]) * x2 + a[0] + (a[3] * x2 + a[1]) * x) / ((b[4] * x2 + b[2]) * x2 + b[0] + (b[3] * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((a[0] * z2 + a[2]) * z2 + a[4] + (a[1] * z2 + a[3]) * z) / ((b[0] * z2 + b[2]) * z2 + b[4] + (b[1] * z2 + b[3]) * z));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<6>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((a[5] * x2 + a[3]) * x2 + a[1]) * x + (a[4] * x2 + a[2]) * x2 + a[0]) / (((b[5] * x2 + b[3]) * x2 + b[1]) * x + (b[4] * x2 + b[2]) * x2 + b[0]));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((a[0] * z2 + a[2]) * z2 + a[4]) * z + (a[1] * z2 + a[3]) * z2 + a[5]) / (((b[0] * z2 + b[2]) * z2 + b[4]) * z + (b[1] * z2 + b[3]) * z2 + b[5]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<7>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>((((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((a[5] * x2 + a[3]) * x2 + a[1]) * x) / (((b[6] * x2 + b[4]) * x2 + b[2]) * x2 + b[0] + ((b[5] * x2 + b[3]) * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6] + ((a[1] * z2 + a[3]) * z2 + a[5]) * z) / (((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6] + ((b[1] * z2 + b[3]) * z2 + b[5]) * z));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<8>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0]) / ((((b[7] * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x + ((b[6] * x2 + b[4]) * x2 + b[2]) * x2 + b[0]));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z + ((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) / ((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z + ((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]));
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<9>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ return static_cast<V>(((((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x) / ((((b[8] * x2 + b[6]) * x2 + b[4]) * x2 + b[2]) * x2 + b[0] + (((b[7] * x2 + b[5]) * x2 + b[3]) * x2 + b[1]) * x));
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ return static_cast<V>(((((a[0] * z2 + a[2]) * z2 + a[4]) * z2 + a[6]) * z2 + a[8] + (((a[1] * z2 + a[3]) * z2 + a[5]) * z2 + a[7]) * z) / ((((b[0] * z2 + b[2]) * z2 + b[4]) * z2 + b[6]) * z2 + b[8] + (((b[1] * z2 + b[3]) * z2 + b[5]) * z2 + b[7]) * z));
+ }
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_10.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_10.hpp
new file mode 100644
index 00000000000..019ffdacc3a
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_10.hpp
@@ -0,0 +1,396 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_RAT_EVAL_10_HPP
+#define BOOST_MATH_TOOLS_RAT_EVAL_10_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T*, const U*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]) / static_cast<V>(b[0]);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>((a[1] * x + a[0]) / (b[1] * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<5>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[4] * x2 + a[2];
+ t[1] = a[3] * x2 + a[1];
+ t[2] = b[4] * x2 + b[2];
+ t[3] = b[3] * x2 + b[1];
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[2] += static_cast<V>(b[4]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<6>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[5] * x2 + a[3];
+ t[1] = a[4] * x2 + a[2];
+ t[2] = b[5] * x2 + b[3];
+ t[3] = b[4] * x2 + b[2];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[1]);
+ t[3] += static_cast<V>(b[0]);
+ t[0] *= x;
+ t[2] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z;
+ t[2] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<7>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[6] * x2 + a[4];
+ t[1] = a[5] * x2 + a[3];
+ t[2] = b[6] * x2 + b[4];
+ t[3] = b[5] * x2 + b[3];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[2] += static_cast<V>(b[2]);
+ t[3] += static_cast<V>(b[1]);
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[2] += static_cast<V>(b[6]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<8>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[7] * x2 + a[5];
+ t[1] = a[6] * x2 + a[4];
+ t[2] = b[7] * x2 + b[5];
+ t[3] = b[6] * x2 + b[4];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[2] += static_cast<V>(b[3]);
+ t[3] += static_cast<V>(b[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[1]);
+ t[3] += static_cast<V>(b[0]);
+ t[0] *= x;
+ t[2] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z;
+ t[2] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<9>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[8] * x2 + a[6];
+ t[1] = a[7] * x2 + a[5];
+ t[2] = b[8] * x2 + b[6];
+ t[3] = b[7] * x2 + b[5];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[2] += static_cast<V>(b[2]);
+ t[3] += static_cast<V>(b[1]);
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[2] += static_cast<V>(b[8]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<10>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[9] * x2 + a[7];
+ t[1] = a[8] * x2 + a[6];
+ t[2] = b[9] * x2 + b[7];
+ t[3] = b[8] * x2 + b[6];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[2] += static_cast<V>(b[5]);
+ t[3] += static_cast<V>(b[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[2] += static_cast<V>(b[3]);
+ t[3] += static_cast<V>(b[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[1]);
+ t[3] += static_cast<V>(b[0]);
+ t[0] *= x;
+ t[2] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= z;
+ t[2] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_11.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_11.hpp
new file mode 100644
index 00000000000..13ce3134ae5
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_11.hpp
@@ -0,0 +1,482 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_RAT_EVAL_11_HPP
+#define BOOST_MATH_TOOLS_RAT_EVAL_11_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T*, const U*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]) / static_cast<V>(b[0]);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>((a[1] * x + a[0]) / (b[1] * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<5>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[4] * x2 + a[2];
+ t[1] = a[3] * x2 + a[1];
+ t[2] = b[4] * x2 + b[2];
+ t[3] = b[3] * x2 + b[1];
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[2] += static_cast<V>(b[4]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<6>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[5] * x2 + a[3];
+ t[1] = a[4] * x2 + a[2];
+ t[2] = b[5] * x2 + b[3];
+ t[3] = b[4] * x2 + b[2];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[1]);
+ t[3] += static_cast<V>(b[0]);
+ t[0] *= x;
+ t[2] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z;
+ t[2] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<7>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[6] * x2 + a[4];
+ t[1] = a[5] * x2 + a[3];
+ t[2] = b[6] * x2 + b[4];
+ t[3] = b[5] * x2 + b[3];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[2] += static_cast<V>(b[2]);
+ t[3] += static_cast<V>(b[1]);
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[2] += static_cast<V>(b[6]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<8>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[7] * x2 + a[5];
+ t[1] = a[6] * x2 + a[4];
+ t[2] = b[7] * x2 + b[5];
+ t[3] = b[6] * x2 + b[4];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[2] += static_cast<V>(b[3]);
+ t[3] += static_cast<V>(b[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[1]);
+ t[3] += static_cast<V>(b[0]);
+ t[0] *= x;
+ t[2] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z;
+ t[2] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<9>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[8] * x2 + a[6];
+ t[1] = a[7] * x2 + a[5];
+ t[2] = b[8] * x2 + b[6];
+ t[3] = b[7] * x2 + b[5];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[2] += static_cast<V>(b[2]);
+ t[3] += static_cast<V>(b[1]);
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[2] += static_cast<V>(b[8]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<10>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[9] * x2 + a[7];
+ t[1] = a[8] * x2 + a[6];
+ t[2] = b[9] * x2 + b[7];
+ t[3] = b[8] * x2 + b[6];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[2] += static_cast<V>(b[5]);
+ t[3] += static_cast<V>(b[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[2] += static_cast<V>(b[3]);
+ t[3] += static_cast<V>(b[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[1]);
+ t[3] += static_cast<V>(b[0]);
+ t[0] *= x;
+ t[2] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= z;
+ t[2] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<11>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[10] * x2 + a[8];
+ t[1] = a[9] * x2 + a[7];
+ t[2] = b[10] * x2 + b[8];
+ t[3] = b[9] * x2 + b[7];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[2] += static_cast<V>(b[2]);
+ t[3] += static_cast<V>(b[1]);
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[10]);
+ t[2] += static_cast<V>(b[10]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_12.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_12.hpp
new file mode 100644
index 00000000000..634140bd0d1
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_12.hpp
@@ -0,0 +1,576 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_RAT_EVAL_12_HPP
+#define BOOST_MATH_TOOLS_RAT_EVAL_12_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T*, const U*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]) / static_cast<V>(b[0]);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>((a[1] * x + a[0]) / (b[1] * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<5>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[4] * x2 + a[2];
+ t[1] = a[3] * x2 + a[1];
+ t[2] = b[4] * x2 + b[2];
+ t[3] = b[3] * x2 + b[1];
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[2] += static_cast<V>(b[4]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<6>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[5] * x2 + a[3];
+ t[1] = a[4] * x2 + a[2];
+ t[2] = b[5] * x2 + b[3];
+ t[3] = b[4] * x2 + b[2];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[1]);
+ t[3] += static_cast<V>(b[0]);
+ t[0] *= x;
+ t[2] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z;
+ t[2] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<7>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[6] * x2 + a[4];
+ t[1] = a[5] * x2 + a[3];
+ t[2] = b[6] * x2 + b[4];
+ t[3] = b[5] * x2 + b[3];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[2] += static_cast<V>(b[2]);
+ t[3] += static_cast<V>(b[1]);
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[2] += static_cast<V>(b[6]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<8>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[7] * x2 + a[5];
+ t[1] = a[6] * x2 + a[4];
+ t[2] = b[7] * x2 + b[5];
+ t[3] = b[6] * x2 + b[4];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[2] += static_cast<V>(b[3]);
+ t[3] += static_cast<V>(b[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[1]);
+ t[3] += static_cast<V>(b[0]);
+ t[0] *= x;
+ t[2] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z;
+ t[2] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<9>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[8] * x2 + a[6];
+ t[1] = a[7] * x2 + a[5];
+ t[2] = b[8] * x2 + b[6];
+ t[3] = b[7] * x2 + b[5];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[2] += static_cast<V>(b[2]);
+ t[3] += static_cast<V>(b[1]);
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[2] += static_cast<V>(b[8]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<10>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[9] * x2 + a[7];
+ t[1] = a[8] * x2 + a[6];
+ t[2] = b[9] * x2 + b[7];
+ t[3] = b[8] * x2 + b[6];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[2] += static_cast<V>(b[5]);
+ t[3] += static_cast<V>(b[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[2] += static_cast<V>(b[3]);
+ t[3] += static_cast<V>(b[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[1]);
+ t[3] += static_cast<V>(b[0]);
+ t[0] *= x;
+ t[2] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= z;
+ t[2] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<11>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[10] * x2 + a[8];
+ t[1] = a[9] * x2 + a[7];
+ t[2] = b[10] * x2 + b[8];
+ t[3] = b[9] * x2 + b[7];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[2] += static_cast<V>(b[2]);
+ t[3] += static_cast<V>(b[1]);
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[10]);
+ t[2] += static_cast<V>(b[10]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<12>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[11] * x2 + a[9];
+ t[1] = a[10] * x2 + a[8];
+ t[2] = b[11] * x2 + b[9];
+ t[3] = b[10] * x2 + b[8];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[7]);
+ t[1] += static_cast<V>(a[6]);
+ t[2] += static_cast<V>(b[7]);
+ t[3] += static_cast<V>(b[6]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[2] += static_cast<V>(b[5]);
+ t[3] += static_cast<V>(b[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[2] += static_cast<V>(b[3]);
+ t[3] += static_cast<V>(b[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[1]);
+ t[3] += static_cast<V>(b[0]);
+ t[0] *= x;
+ t[2] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[11]);
+ t[2] += static_cast<V>(b[10]);
+ t[3] += static_cast<V>(b[11]);
+ t[0] *= z;
+ t[2] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_13.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_13.hpp
new file mode 100644
index 00000000000..0b4974a5016
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_13.hpp
@@ -0,0 +1,678 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_RAT_EVAL_13_HPP
+#define BOOST_MATH_TOOLS_RAT_EVAL_13_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T*, const U*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]) / static_cast<V>(b[0]);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>((a[1] * x + a[0]) / (b[1] * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<5>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[4] * x2 + a[2];
+ t[1] = a[3] * x2 + a[1];
+ t[2] = b[4] * x2 + b[2];
+ t[3] = b[3] * x2 + b[1];
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[2] += static_cast<V>(b[4]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<6>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[5] * x2 + a[3];
+ t[1] = a[4] * x2 + a[2];
+ t[2] = b[5] * x2 + b[3];
+ t[3] = b[4] * x2 + b[2];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[1]);
+ t[3] += static_cast<V>(b[0]);
+ t[0] *= x;
+ t[2] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z;
+ t[2] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<7>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[6] * x2 + a[4];
+ t[1] = a[5] * x2 + a[3];
+ t[2] = b[6] * x2 + b[4];
+ t[3] = b[5] * x2 + b[3];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[2] += static_cast<V>(b[2]);
+ t[3] += static_cast<V>(b[1]);
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[2] += static_cast<V>(b[6]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<8>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[7] * x2 + a[5];
+ t[1] = a[6] * x2 + a[4];
+ t[2] = b[7] * x2 + b[5];
+ t[3] = b[6] * x2 + b[4];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[2] += static_cast<V>(b[3]);
+ t[3] += static_cast<V>(b[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[1]);
+ t[3] += static_cast<V>(b[0]);
+ t[0] *= x;
+ t[2] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z;
+ t[2] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<9>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[8] * x2 + a[6];
+ t[1] = a[7] * x2 + a[5];
+ t[2] = b[8] * x2 + b[6];
+ t[3] = b[7] * x2 + b[5];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[2] += static_cast<V>(b[2]);
+ t[3] += static_cast<V>(b[1]);
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[2] += static_cast<V>(b[8]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<10>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[9] * x2 + a[7];
+ t[1] = a[8] * x2 + a[6];
+ t[2] = b[9] * x2 + b[7];
+ t[3] = b[8] * x2 + b[6];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[2] += static_cast<V>(b[5]);
+ t[3] += static_cast<V>(b[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[2] += static_cast<V>(b[3]);
+ t[3] += static_cast<V>(b[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[1]);
+ t[3] += static_cast<V>(b[0]);
+ t[0] *= x;
+ t[2] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= z;
+ t[2] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<11>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[10] * x2 + a[8];
+ t[1] = a[9] * x2 + a[7];
+ t[2] = b[10] * x2 + b[8];
+ t[3] = b[9] * x2 + b[7];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[2] += static_cast<V>(b[2]);
+ t[3] += static_cast<V>(b[1]);
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[10]);
+ t[2] += static_cast<V>(b[10]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<12>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[11] * x2 + a[9];
+ t[1] = a[10] * x2 + a[8];
+ t[2] = b[11] * x2 + b[9];
+ t[3] = b[10] * x2 + b[8];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[7]);
+ t[1] += static_cast<V>(a[6]);
+ t[2] += static_cast<V>(b[7]);
+ t[3] += static_cast<V>(b[6]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[2] += static_cast<V>(b[5]);
+ t[3] += static_cast<V>(b[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[2] += static_cast<V>(b[3]);
+ t[3] += static_cast<V>(b[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[1]);
+ t[3] += static_cast<V>(b[0]);
+ t[0] *= x;
+ t[2] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[11]);
+ t[2] += static_cast<V>(b[10]);
+ t[3] += static_cast<V>(b[11]);
+ t[0] *= z;
+ t[2] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<13>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[12] * x2 + a[10];
+ t[1] = a[11] * x2 + a[9];
+ t[2] = b[12] * x2 + b[10];
+ t[3] = b[11] * x2 + b[9];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[2] += static_cast<V>(b[2]);
+ t[3] += static_cast<V>(b[1]);
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[11]);
+ t[2] += static_cast<V>(b[10]);
+ t[3] += static_cast<V>(b[11]);
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[12]);
+ t[2] += static_cast<V>(b[12]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_14.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_14.hpp
new file mode 100644
index 00000000000..63f4e959631
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_14.hpp
@@ -0,0 +1,788 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_RAT_EVAL_14_HPP
+#define BOOST_MATH_TOOLS_RAT_EVAL_14_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T*, const U*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]) / static_cast<V>(b[0]);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>((a[1] * x + a[0]) / (b[1] * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<5>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[4] * x2 + a[2];
+ t[1] = a[3] * x2 + a[1];
+ t[2] = b[4] * x2 + b[2];
+ t[3] = b[3] * x2 + b[1];
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[2] += static_cast<V>(b[4]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<6>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[5] * x2 + a[3];
+ t[1] = a[4] * x2 + a[2];
+ t[2] = b[5] * x2 + b[3];
+ t[3] = b[4] * x2 + b[2];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[1]);
+ t[3] += static_cast<V>(b[0]);
+ t[0] *= x;
+ t[2] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z;
+ t[2] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<7>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[6] * x2 + a[4];
+ t[1] = a[5] * x2 + a[3];
+ t[2] = b[6] * x2 + b[4];
+ t[3] = b[5] * x2 + b[3];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[2] += static_cast<V>(b[2]);
+ t[3] += static_cast<V>(b[1]);
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[2] += static_cast<V>(b[6]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<8>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[7] * x2 + a[5];
+ t[1] = a[6] * x2 + a[4];
+ t[2] = b[7] * x2 + b[5];
+ t[3] = b[6] * x2 + b[4];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[2] += static_cast<V>(b[3]);
+ t[3] += static_cast<V>(b[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[1]);
+ t[3] += static_cast<V>(b[0]);
+ t[0] *= x;
+ t[2] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z;
+ t[2] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<9>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[8] * x2 + a[6];
+ t[1] = a[7] * x2 + a[5];
+ t[2] = b[8] * x2 + b[6];
+ t[3] = b[7] * x2 + b[5];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[2] += static_cast<V>(b[2]);
+ t[3] += static_cast<V>(b[1]);
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[2] += static_cast<V>(b[8]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<10>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[9] * x2 + a[7];
+ t[1] = a[8] * x2 + a[6];
+ t[2] = b[9] * x2 + b[7];
+ t[3] = b[8] * x2 + b[6];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[2] += static_cast<V>(b[5]);
+ t[3] += static_cast<V>(b[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[2] += static_cast<V>(b[3]);
+ t[3] += static_cast<V>(b[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[1]);
+ t[3] += static_cast<V>(b[0]);
+ t[0] *= x;
+ t[2] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= z;
+ t[2] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<11>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[10] * x2 + a[8];
+ t[1] = a[9] * x2 + a[7];
+ t[2] = b[10] * x2 + b[8];
+ t[3] = b[9] * x2 + b[7];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[2] += static_cast<V>(b[2]);
+ t[3] += static_cast<V>(b[1]);
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[10]);
+ t[2] += static_cast<V>(b[10]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<12>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[11] * x2 + a[9];
+ t[1] = a[10] * x2 + a[8];
+ t[2] = b[11] * x2 + b[9];
+ t[3] = b[10] * x2 + b[8];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[7]);
+ t[1] += static_cast<V>(a[6]);
+ t[2] += static_cast<V>(b[7]);
+ t[3] += static_cast<V>(b[6]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[2] += static_cast<V>(b[5]);
+ t[3] += static_cast<V>(b[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[2] += static_cast<V>(b[3]);
+ t[3] += static_cast<V>(b[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[1]);
+ t[3] += static_cast<V>(b[0]);
+ t[0] *= x;
+ t[2] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[11]);
+ t[2] += static_cast<V>(b[10]);
+ t[3] += static_cast<V>(b[11]);
+ t[0] *= z;
+ t[2] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<13>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[12] * x2 + a[10];
+ t[1] = a[11] * x2 + a[9];
+ t[2] = b[12] * x2 + b[10];
+ t[3] = b[11] * x2 + b[9];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[2] += static_cast<V>(b[2]);
+ t[3] += static_cast<V>(b[1]);
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[11]);
+ t[2] += static_cast<V>(b[10]);
+ t[3] += static_cast<V>(b[11]);
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[12]);
+ t[2] += static_cast<V>(b[12]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<14>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[13] * x2 + a[11];
+ t[1] = a[12] * x2 + a[10];
+ t[2] = b[13] * x2 + b[11];
+ t[3] = b[12] * x2 + b[10];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[9]);
+ t[1] += static_cast<V>(a[8]);
+ t[2] += static_cast<V>(b[9]);
+ t[3] += static_cast<V>(b[8]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[7]);
+ t[1] += static_cast<V>(a[6]);
+ t[2] += static_cast<V>(b[7]);
+ t[3] += static_cast<V>(b[6]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[2] += static_cast<V>(b[5]);
+ t[3] += static_cast<V>(b[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[2] += static_cast<V>(b[3]);
+ t[3] += static_cast<V>(b[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[1]);
+ t[3] += static_cast<V>(b[0]);
+ t[0] *= x;
+ t[2] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[11]);
+ t[2] += static_cast<V>(b[10]);
+ t[3] += static_cast<V>(b[11]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[12]);
+ t[1] += static_cast<V>(a[13]);
+ t[2] += static_cast<V>(b[12]);
+ t[3] += static_cast<V>(b[13]);
+ t[0] *= z;
+ t[2] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_15.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_15.hpp
new file mode 100644
index 00000000000..c13500f1307
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_15.hpp
@@ -0,0 +1,906 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_RAT_EVAL_15_HPP
+#define BOOST_MATH_TOOLS_RAT_EVAL_15_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T*, const U*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]) / static_cast<V>(b[0]);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>((a[1] * x + a[0]) / (b[1] * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<5>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[4] * x2 + a[2];
+ t[1] = a[3] * x2 + a[1];
+ t[2] = b[4] * x2 + b[2];
+ t[3] = b[3] * x2 + b[1];
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[2] += static_cast<V>(b[4]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<6>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[5] * x2 + a[3];
+ t[1] = a[4] * x2 + a[2];
+ t[2] = b[5] * x2 + b[3];
+ t[3] = b[4] * x2 + b[2];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[1]);
+ t[3] += static_cast<V>(b[0]);
+ t[0] *= x;
+ t[2] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z;
+ t[2] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<7>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[6] * x2 + a[4];
+ t[1] = a[5] * x2 + a[3];
+ t[2] = b[6] * x2 + b[4];
+ t[3] = b[5] * x2 + b[3];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[2] += static_cast<V>(b[2]);
+ t[3] += static_cast<V>(b[1]);
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[2] += static_cast<V>(b[6]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<8>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[7] * x2 + a[5];
+ t[1] = a[6] * x2 + a[4];
+ t[2] = b[7] * x2 + b[5];
+ t[3] = b[6] * x2 + b[4];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[2] += static_cast<V>(b[3]);
+ t[3] += static_cast<V>(b[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[1]);
+ t[3] += static_cast<V>(b[0]);
+ t[0] *= x;
+ t[2] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z;
+ t[2] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<9>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[8] * x2 + a[6];
+ t[1] = a[7] * x2 + a[5];
+ t[2] = b[8] * x2 + b[6];
+ t[3] = b[7] * x2 + b[5];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[2] += static_cast<V>(b[2]);
+ t[3] += static_cast<V>(b[1]);
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[2] += static_cast<V>(b[8]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<10>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[9] * x2 + a[7];
+ t[1] = a[8] * x2 + a[6];
+ t[2] = b[9] * x2 + b[7];
+ t[3] = b[8] * x2 + b[6];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[2] += static_cast<V>(b[5]);
+ t[3] += static_cast<V>(b[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[2] += static_cast<V>(b[3]);
+ t[3] += static_cast<V>(b[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[1]);
+ t[3] += static_cast<V>(b[0]);
+ t[0] *= x;
+ t[2] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= z;
+ t[2] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<11>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[10] * x2 + a[8];
+ t[1] = a[9] * x2 + a[7];
+ t[2] = b[10] * x2 + b[8];
+ t[3] = b[9] * x2 + b[7];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[2] += static_cast<V>(b[2]);
+ t[3] += static_cast<V>(b[1]);
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[10]);
+ t[2] += static_cast<V>(b[10]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<12>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[11] * x2 + a[9];
+ t[1] = a[10] * x2 + a[8];
+ t[2] = b[11] * x2 + b[9];
+ t[3] = b[10] * x2 + b[8];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[7]);
+ t[1] += static_cast<V>(a[6]);
+ t[2] += static_cast<V>(b[7]);
+ t[3] += static_cast<V>(b[6]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[2] += static_cast<V>(b[5]);
+ t[3] += static_cast<V>(b[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[2] += static_cast<V>(b[3]);
+ t[3] += static_cast<V>(b[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[1]);
+ t[3] += static_cast<V>(b[0]);
+ t[0] *= x;
+ t[2] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[11]);
+ t[2] += static_cast<V>(b[10]);
+ t[3] += static_cast<V>(b[11]);
+ t[0] *= z;
+ t[2] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<13>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[12] * x2 + a[10];
+ t[1] = a[11] * x2 + a[9];
+ t[2] = b[12] * x2 + b[10];
+ t[3] = b[11] * x2 + b[9];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[2] += static_cast<V>(b[2]);
+ t[3] += static_cast<V>(b[1]);
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[11]);
+ t[2] += static_cast<V>(b[10]);
+ t[3] += static_cast<V>(b[11]);
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[12]);
+ t[2] += static_cast<V>(b[12]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<14>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[13] * x2 + a[11];
+ t[1] = a[12] * x2 + a[10];
+ t[2] = b[13] * x2 + b[11];
+ t[3] = b[12] * x2 + b[10];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[9]);
+ t[1] += static_cast<V>(a[8]);
+ t[2] += static_cast<V>(b[9]);
+ t[3] += static_cast<V>(b[8]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[7]);
+ t[1] += static_cast<V>(a[6]);
+ t[2] += static_cast<V>(b[7]);
+ t[3] += static_cast<V>(b[6]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[2] += static_cast<V>(b[5]);
+ t[3] += static_cast<V>(b[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[2] += static_cast<V>(b[3]);
+ t[3] += static_cast<V>(b[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[1]);
+ t[3] += static_cast<V>(b[0]);
+ t[0] *= x;
+ t[2] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[11]);
+ t[2] += static_cast<V>(b[10]);
+ t[3] += static_cast<V>(b[11]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[12]);
+ t[1] += static_cast<V>(a[13]);
+ t[2] += static_cast<V>(b[12]);
+ t[3] += static_cast<V>(b[13]);
+ t[0] *= z;
+ t[2] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<15>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[14] * x2 + a[12];
+ t[1] = a[13] * x2 + a[11];
+ t[2] = b[14] * x2 + b[12];
+ t[3] = b[13] * x2 + b[11];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[10]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[2] += static_cast<V>(b[2]);
+ t[3] += static_cast<V>(b[1]);
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[11]);
+ t[2] += static_cast<V>(b[10]);
+ t[3] += static_cast<V>(b[11]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[12]);
+ t[1] += static_cast<V>(a[13]);
+ t[2] += static_cast<V>(b[12]);
+ t[3] += static_cast<V>(b[13]);
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[14]);
+ t[2] += static_cast<V>(b[14]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_16.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_16.hpp
new file mode 100644
index 00000000000..b1c89774f8e
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_16.hpp
@@ -0,0 +1,1032 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_RAT_EVAL_16_HPP
+#define BOOST_MATH_TOOLS_RAT_EVAL_16_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T*, const U*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]) / static_cast<V>(b[0]);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>((a[1] * x + a[0]) / (b[1] * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<5>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[4] * x2 + a[2];
+ t[1] = a[3] * x2 + a[1];
+ t[2] = b[4] * x2 + b[2];
+ t[3] = b[3] * x2 + b[1];
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[2] += static_cast<V>(b[4]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<6>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[5] * x2 + a[3];
+ t[1] = a[4] * x2 + a[2];
+ t[2] = b[5] * x2 + b[3];
+ t[3] = b[4] * x2 + b[2];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[1]);
+ t[3] += static_cast<V>(b[0]);
+ t[0] *= x;
+ t[2] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z;
+ t[2] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<7>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[6] * x2 + a[4];
+ t[1] = a[5] * x2 + a[3];
+ t[2] = b[6] * x2 + b[4];
+ t[3] = b[5] * x2 + b[3];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[2] += static_cast<V>(b[2]);
+ t[3] += static_cast<V>(b[1]);
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[2] += static_cast<V>(b[6]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<8>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[7] * x2 + a[5];
+ t[1] = a[6] * x2 + a[4];
+ t[2] = b[7] * x2 + b[5];
+ t[3] = b[6] * x2 + b[4];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[2] += static_cast<V>(b[3]);
+ t[3] += static_cast<V>(b[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[1]);
+ t[3] += static_cast<V>(b[0]);
+ t[0] *= x;
+ t[2] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z;
+ t[2] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<9>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[8] * x2 + a[6];
+ t[1] = a[7] * x2 + a[5];
+ t[2] = b[8] * x2 + b[6];
+ t[3] = b[7] * x2 + b[5];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[2] += static_cast<V>(b[2]);
+ t[3] += static_cast<V>(b[1]);
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[2] += static_cast<V>(b[8]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<10>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[9] * x2 + a[7];
+ t[1] = a[8] * x2 + a[6];
+ t[2] = b[9] * x2 + b[7];
+ t[3] = b[8] * x2 + b[6];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[2] += static_cast<V>(b[5]);
+ t[3] += static_cast<V>(b[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[2] += static_cast<V>(b[3]);
+ t[3] += static_cast<V>(b[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[1]);
+ t[3] += static_cast<V>(b[0]);
+ t[0] *= x;
+ t[2] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= z;
+ t[2] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<11>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[10] * x2 + a[8];
+ t[1] = a[9] * x2 + a[7];
+ t[2] = b[10] * x2 + b[8];
+ t[3] = b[9] * x2 + b[7];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[2] += static_cast<V>(b[2]);
+ t[3] += static_cast<V>(b[1]);
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[10]);
+ t[2] += static_cast<V>(b[10]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<12>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[11] * x2 + a[9];
+ t[1] = a[10] * x2 + a[8];
+ t[2] = b[11] * x2 + b[9];
+ t[3] = b[10] * x2 + b[8];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[7]);
+ t[1] += static_cast<V>(a[6]);
+ t[2] += static_cast<V>(b[7]);
+ t[3] += static_cast<V>(b[6]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[2] += static_cast<V>(b[5]);
+ t[3] += static_cast<V>(b[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[2] += static_cast<V>(b[3]);
+ t[3] += static_cast<V>(b[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[1]);
+ t[3] += static_cast<V>(b[0]);
+ t[0] *= x;
+ t[2] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[11]);
+ t[2] += static_cast<V>(b[10]);
+ t[3] += static_cast<V>(b[11]);
+ t[0] *= z;
+ t[2] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<13>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[12] * x2 + a[10];
+ t[1] = a[11] * x2 + a[9];
+ t[2] = b[12] * x2 + b[10];
+ t[3] = b[11] * x2 + b[9];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[2] += static_cast<V>(b[2]);
+ t[3] += static_cast<V>(b[1]);
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[11]);
+ t[2] += static_cast<V>(b[10]);
+ t[3] += static_cast<V>(b[11]);
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[12]);
+ t[2] += static_cast<V>(b[12]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<14>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[13] * x2 + a[11];
+ t[1] = a[12] * x2 + a[10];
+ t[2] = b[13] * x2 + b[11];
+ t[3] = b[12] * x2 + b[10];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[9]);
+ t[1] += static_cast<V>(a[8]);
+ t[2] += static_cast<V>(b[9]);
+ t[3] += static_cast<V>(b[8]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[7]);
+ t[1] += static_cast<V>(a[6]);
+ t[2] += static_cast<V>(b[7]);
+ t[3] += static_cast<V>(b[6]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[2] += static_cast<V>(b[5]);
+ t[3] += static_cast<V>(b[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[2] += static_cast<V>(b[3]);
+ t[3] += static_cast<V>(b[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[1]);
+ t[3] += static_cast<V>(b[0]);
+ t[0] *= x;
+ t[2] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[11]);
+ t[2] += static_cast<V>(b[10]);
+ t[3] += static_cast<V>(b[11]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[12]);
+ t[1] += static_cast<V>(a[13]);
+ t[2] += static_cast<V>(b[12]);
+ t[3] += static_cast<V>(b[13]);
+ t[0] *= z;
+ t[2] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<15>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[14] * x2 + a[12];
+ t[1] = a[13] * x2 + a[11];
+ t[2] = b[14] * x2 + b[12];
+ t[3] = b[13] * x2 + b[11];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[10]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[2] += static_cast<V>(b[2]);
+ t[3] += static_cast<V>(b[1]);
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[11]);
+ t[2] += static_cast<V>(b[10]);
+ t[3] += static_cast<V>(b[11]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[12]);
+ t[1] += static_cast<V>(a[13]);
+ t[2] += static_cast<V>(b[12]);
+ t[3] += static_cast<V>(b[13]);
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[14]);
+ t[2] += static_cast<V>(b[14]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<16>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[15] * x2 + a[13];
+ t[1] = a[14] * x2 + a[12];
+ t[2] = b[15] * x2 + b[13];
+ t[3] = b[14] * x2 + b[12];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[11]);
+ t[1] += static_cast<V>(a[10]);
+ t[2] += static_cast<V>(b[11]);
+ t[3] += static_cast<V>(b[10]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[9]);
+ t[1] += static_cast<V>(a[8]);
+ t[2] += static_cast<V>(b[9]);
+ t[3] += static_cast<V>(b[8]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[7]);
+ t[1] += static_cast<V>(a[6]);
+ t[2] += static_cast<V>(b[7]);
+ t[3] += static_cast<V>(b[6]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[2] += static_cast<V>(b[5]);
+ t[3] += static_cast<V>(b[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[2] += static_cast<V>(b[3]);
+ t[3] += static_cast<V>(b[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[1]);
+ t[3] += static_cast<V>(b[0]);
+ t[0] *= x;
+ t[2] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[11]);
+ t[2] += static_cast<V>(b[10]);
+ t[3] += static_cast<V>(b[11]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[12]);
+ t[1] += static_cast<V>(a[13]);
+ t[2] += static_cast<V>(b[12]);
+ t[3] += static_cast<V>(b[13]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[14]);
+ t[1] += static_cast<V>(a[15]);
+ t[2] += static_cast<V>(b[14]);
+ t[3] += static_cast<V>(b[15]);
+ t[0] *= z;
+ t[2] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_17.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_17.hpp
new file mode 100644
index 00000000000..9c3498ec24f
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_17.hpp
@@ -0,0 +1,1166 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_RAT_EVAL_17_HPP
+#define BOOST_MATH_TOOLS_RAT_EVAL_17_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T*, const U*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]) / static_cast<V>(b[0]);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>((a[1] * x + a[0]) / (b[1] * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<5>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[4] * x2 + a[2];
+ t[1] = a[3] * x2 + a[1];
+ t[2] = b[4] * x2 + b[2];
+ t[3] = b[3] * x2 + b[1];
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[2] += static_cast<V>(b[4]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<6>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[5] * x2 + a[3];
+ t[1] = a[4] * x2 + a[2];
+ t[2] = b[5] * x2 + b[3];
+ t[3] = b[4] * x2 + b[2];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[1]);
+ t[3] += static_cast<V>(b[0]);
+ t[0] *= x;
+ t[2] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z;
+ t[2] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<7>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[6] * x2 + a[4];
+ t[1] = a[5] * x2 + a[3];
+ t[2] = b[6] * x2 + b[4];
+ t[3] = b[5] * x2 + b[3];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[2] += static_cast<V>(b[2]);
+ t[3] += static_cast<V>(b[1]);
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[2] += static_cast<V>(b[6]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<8>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[7] * x2 + a[5];
+ t[1] = a[6] * x2 + a[4];
+ t[2] = b[7] * x2 + b[5];
+ t[3] = b[6] * x2 + b[4];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[2] += static_cast<V>(b[3]);
+ t[3] += static_cast<V>(b[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[1]);
+ t[3] += static_cast<V>(b[0]);
+ t[0] *= x;
+ t[2] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z;
+ t[2] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<9>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[8] * x2 + a[6];
+ t[1] = a[7] * x2 + a[5];
+ t[2] = b[8] * x2 + b[6];
+ t[3] = b[7] * x2 + b[5];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[2] += static_cast<V>(b[2]);
+ t[3] += static_cast<V>(b[1]);
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[2] += static_cast<V>(b[8]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<10>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[9] * x2 + a[7];
+ t[1] = a[8] * x2 + a[6];
+ t[2] = b[9] * x2 + b[7];
+ t[3] = b[8] * x2 + b[6];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[2] += static_cast<V>(b[5]);
+ t[3] += static_cast<V>(b[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[2] += static_cast<V>(b[3]);
+ t[3] += static_cast<V>(b[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[1]);
+ t[3] += static_cast<V>(b[0]);
+ t[0] *= x;
+ t[2] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= z;
+ t[2] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<11>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[10] * x2 + a[8];
+ t[1] = a[9] * x2 + a[7];
+ t[2] = b[10] * x2 + b[8];
+ t[3] = b[9] * x2 + b[7];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[2] += static_cast<V>(b[2]);
+ t[3] += static_cast<V>(b[1]);
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[10]);
+ t[2] += static_cast<V>(b[10]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<12>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[11] * x2 + a[9];
+ t[1] = a[10] * x2 + a[8];
+ t[2] = b[11] * x2 + b[9];
+ t[3] = b[10] * x2 + b[8];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[7]);
+ t[1] += static_cast<V>(a[6]);
+ t[2] += static_cast<V>(b[7]);
+ t[3] += static_cast<V>(b[6]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[2] += static_cast<V>(b[5]);
+ t[3] += static_cast<V>(b[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[2] += static_cast<V>(b[3]);
+ t[3] += static_cast<V>(b[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[1]);
+ t[3] += static_cast<V>(b[0]);
+ t[0] *= x;
+ t[2] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[11]);
+ t[2] += static_cast<V>(b[10]);
+ t[3] += static_cast<V>(b[11]);
+ t[0] *= z;
+ t[2] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<13>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[12] * x2 + a[10];
+ t[1] = a[11] * x2 + a[9];
+ t[2] = b[12] * x2 + b[10];
+ t[3] = b[11] * x2 + b[9];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[2] += static_cast<V>(b[2]);
+ t[3] += static_cast<V>(b[1]);
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[11]);
+ t[2] += static_cast<V>(b[10]);
+ t[3] += static_cast<V>(b[11]);
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[12]);
+ t[2] += static_cast<V>(b[12]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<14>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[13] * x2 + a[11];
+ t[1] = a[12] * x2 + a[10];
+ t[2] = b[13] * x2 + b[11];
+ t[3] = b[12] * x2 + b[10];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[9]);
+ t[1] += static_cast<V>(a[8]);
+ t[2] += static_cast<V>(b[9]);
+ t[3] += static_cast<V>(b[8]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[7]);
+ t[1] += static_cast<V>(a[6]);
+ t[2] += static_cast<V>(b[7]);
+ t[3] += static_cast<V>(b[6]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[2] += static_cast<V>(b[5]);
+ t[3] += static_cast<V>(b[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[2] += static_cast<V>(b[3]);
+ t[3] += static_cast<V>(b[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[1]);
+ t[3] += static_cast<V>(b[0]);
+ t[0] *= x;
+ t[2] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[11]);
+ t[2] += static_cast<V>(b[10]);
+ t[3] += static_cast<V>(b[11]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[12]);
+ t[1] += static_cast<V>(a[13]);
+ t[2] += static_cast<V>(b[12]);
+ t[3] += static_cast<V>(b[13]);
+ t[0] *= z;
+ t[2] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<15>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[14] * x2 + a[12];
+ t[1] = a[13] * x2 + a[11];
+ t[2] = b[14] * x2 + b[12];
+ t[3] = b[13] * x2 + b[11];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[10]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[2] += static_cast<V>(b[2]);
+ t[3] += static_cast<V>(b[1]);
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[11]);
+ t[2] += static_cast<V>(b[10]);
+ t[3] += static_cast<V>(b[11]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[12]);
+ t[1] += static_cast<V>(a[13]);
+ t[2] += static_cast<V>(b[12]);
+ t[3] += static_cast<V>(b[13]);
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[14]);
+ t[2] += static_cast<V>(b[14]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<16>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[15] * x2 + a[13];
+ t[1] = a[14] * x2 + a[12];
+ t[2] = b[15] * x2 + b[13];
+ t[3] = b[14] * x2 + b[12];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[11]);
+ t[1] += static_cast<V>(a[10]);
+ t[2] += static_cast<V>(b[11]);
+ t[3] += static_cast<V>(b[10]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[9]);
+ t[1] += static_cast<V>(a[8]);
+ t[2] += static_cast<V>(b[9]);
+ t[3] += static_cast<V>(b[8]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[7]);
+ t[1] += static_cast<V>(a[6]);
+ t[2] += static_cast<V>(b[7]);
+ t[3] += static_cast<V>(b[6]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[2] += static_cast<V>(b[5]);
+ t[3] += static_cast<V>(b[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[2] += static_cast<V>(b[3]);
+ t[3] += static_cast<V>(b[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[1]);
+ t[3] += static_cast<V>(b[0]);
+ t[0] *= x;
+ t[2] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[11]);
+ t[2] += static_cast<V>(b[10]);
+ t[3] += static_cast<V>(b[11]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[12]);
+ t[1] += static_cast<V>(a[13]);
+ t[2] += static_cast<V>(b[12]);
+ t[3] += static_cast<V>(b[13]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[14]);
+ t[1] += static_cast<V>(a[15]);
+ t[2] += static_cast<V>(b[14]);
+ t[3] += static_cast<V>(b[15]);
+ t[0] *= z;
+ t[2] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<17>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[16] * x2 + a[14];
+ t[1] = a[15] * x2 + a[13];
+ t[2] = b[16] * x2 + b[14];
+ t[3] = b[15] * x2 + b[13];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[12]);
+ t[1] += static_cast<V>(a[11]);
+ t[2] += static_cast<V>(b[12]);
+ t[3] += static_cast<V>(b[11]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[10]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[2] += static_cast<V>(b[2]);
+ t[3] += static_cast<V>(b[1]);
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[11]);
+ t[2] += static_cast<V>(b[10]);
+ t[3] += static_cast<V>(b[11]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[12]);
+ t[1] += static_cast<V>(a[13]);
+ t[2] += static_cast<V>(b[12]);
+ t[3] += static_cast<V>(b[13]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[14]);
+ t[1] += static_cast<V>(a[15]);
+ t[2] += static_cast<V>(b[14]);
+ t[3] += static_cast<V>(b[15]);
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[16]);
+ t[2] += static_cast<V>(b[16]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_18.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_18.hpp
new file mode 100644
index 00000000000..5401e9f3a2b
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_18.hpp
@@ -0,0 +1,1308 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_RAT_EVAL_18_HPP
+#define BOOST_MATH_TOOLS_RAT_EVAL_18_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T*, const U*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]) / static_cast<V>(b[0]);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>((a[1] * x + a[0]) / (b[1] * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<5>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[4] * x2 + a[2];
+ t[1] = a[3] * x2 + a[1];
+ t[2] = b[4] * x2 + b[2];
+ t[3] = b[3] * x2 + b[1];
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[2] += static_cast<V>(b[4]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<6>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[5] * x2 + a[3];
+ t[1] = a[4] * x2 + a[2];
+ t[2] = b[5] * x2 + b[3];
+ t[3] = b[4] * x2 + b[2];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[1]);
+ t[3] += static_cast<V>(b[0]);
+ t[0] *= x;
+ t[2] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z;
+ t[2] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<7>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[6] * x2 + a[4];
+ t[1] = a[5] * x2 + a[3];
+ t[2] = b[6] * x2 + b[4];
+ t[3] = b[5] * x2 + b[3];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[2] += static_cast<V>(b[2]);
+ t[3] += static_cast<V>(b[1]);
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[2] += static_cast<V>(b[6]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<8>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[7] * x2 + a[5];
+ t[1] = a[6] * x2 + a[4];
+ t[2] = b[7] * x2 + b[5];
+ t[3] = b[6] * x2 + b[4];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[2] += static_cast<V>(b[3]);
+ t[3] += static_cast<V>(b[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[1]);
+ t[3] += static_cast<V>(b[0]);
+ t[0] *= x;
+ t[2] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z;
+ t[2] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<9>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[8] * x2 + a[6];
+ t[1] = a[7] * x2 + a[5];
+ t[2] = b[8] * x2 + b[6];
+ t[3] = b[7] * x2 + b[5];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[2] += static_cast<V>(b[2]);
+ t[3] += static_cast<V>(b[1]);
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[2] += static_cast<V>(b[8]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<10>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[9] * x2 + a[7];
+ t[1] = a[8] * x2 + a[6];
+ t[2] = b[9] * x2 + b[7];
+ t[3] = b[8] * x2 + b[6];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[2] += static_cast<V>(b[5]);
+ t[3] += static_cast<V>(b[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[2] += static_cast<V>(b[3]);
+ t[3] += static_cast<V>(b[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[1]);
+ t[3] += static_cast<V>(b[0]);
+ t[0] *= x;
+ t[2] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= z;
+ t[2] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<11>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[10] * x2 + a[8];
+ t[1] = a[9] * x2 + a[7];
+ t[2] = b[10] * x2 + b[8];
+ t[3] = b[9] * x2 + b[7];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[2] += static_cast<V>(b[2]);
+ t[3] += static_cast<V>(b[1]);
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[10]);
+ t[2] += static_cast<V>(b[10]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<12>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[11] * x2 + a[9];
+ t[1] = a[10] * x2 + a[8];
+ t[2] = b[11] * x2 + b[9];
+ t[3] = b[10] * x2 + b[8];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[7]);
+ t[1] += static_cast<V>(a[6]);
+ t[2] += static_cast<V>(b[7]);
+ t[3] += static_cast<V>(b[6]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[2] += static_cast<V>(b[5]);
+ t[3] += static_cast<V>(b[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[2] += static_cast<V>(b[3]);
+ t[3] += static_cast<V>(b[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[1]);
+ t[3] += static_cast<V>(b[0]);
+ t[0] *= x;
+ t[2] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[11]);
+ t[2] += static_cast<V>(b[10]);
+ t[3] += static_cast<V>(b[11]);
+ t[0] *= z;
+ t[2] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<13>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[12] * x2 + a[10];
+ t[1] = a[11] * x2 + a[9];
+ t[2] = b[12] * x2 + b[10];
+ t[3] = b[11] * x2 + b[9];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[2] += static_cast<V>(b[2]);
+ t[3] += static_cast<V>(b[1]);
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[11]);
+ t[2] += static_cast<V>(b[10]);
+ t[3] += static_cast<V>(b[11]);
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[12]);
+ t[2] += static_cast<V>(b[12]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<14>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[13] * x2 + a[11];
+ t[1] = a[12] * x2 + a[10];
+ t[2] = b[13] * x2 + b[11];
+ t[3] = b[12] * x2 + b[10];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[9]);
+ t[1] += static_cast<V>(a[8]);
+ t[2] += static_cast<V>(b[9]);
+ t[3] += static_cast<V>(b[8]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[7]);
+ t[1] += static_cast<V>(a[6]);
+ t[2] += static_cast<V>(b[7]);
+ t[3] += static_cast<V>(b[6]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[2] += static_cast<V>(b[5]);
+ t[3] += static_cast<V>(b[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[2] += static_cast<V>(b[3]);
+ t[3] += static_cast<V>(b[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[1]);
+ t[3] += static_cast<V>(b[0]);
+ t[0] *= x;
+ t[2] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[11]);
+ t[2] += static_cast<V>(b[10]);
+ t[3] += static_cast<V>(b[11]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[12]);
+ t[1] += static_cast<V>(a[13]);
+ t[2] += static_cast<V>(b[12]);
+ t[3] += static_cast<V>(b[13]);
+ t[0] *= z;
+ t[2] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<15>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[14] * x2 + a[12];
+ t[1] = a[13] * x2 + a[11];
+ t[2] = b[14] * x2 + b[12];
+ t[3] = b[13] * x2 + b[11];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[10]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[2] += static_cast<V>(b[2]);
+ t[3] += static_cast<V>(b[1]);
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[11]);
+ t[2] += static_cast<V>(b[10]);
+ t[3] += static_cast<V>(b[11]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[12]);
+ t[1] += static_cast<V>(a[13]);
+ t[2] += static_cast<V>(b[12]);
+ t[3] += static_cast<V>(b[13]);
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[14]);
+ t[2] += static_cast<V>(b[14]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<16>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[15] * x2 + a[13];
+ t[1] = a[14] * x2 + a[12];
+ t[2] = b[15] * x2 + b[13];
+ t[3] = b[14] * x2 + b[12];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[11]);
+ t[1] += static_cast<V>(a[10]);
+ t[2] += static_cast<V>(b[11]);
+ t[3] += static_cast<V>(b[10]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[9]);
+ t[1] += static_cast<V>(a[8]);
+ t[2] += static_cast<V>(b[9]);
+ t[3] += static_cast<V>(b[8]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[7]);
+ t[1] += static_cast<V>(a[6]);
+ t[2] += static_cast<V>(b[7]);
+ t[3] += static_cast<V>(b[6]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[2] += static_cast<V>(b[5]);
+ t[3] += static_cast<V>(b[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[2] += static_cast<V>(b[3]);
+ t[3] += static_cast<V>(b[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[1]);
+ t[3] += static_cast<V>(b[0]);
+ t[0] *= x;
+ t[2] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[11]);
+ t[2] += static_cast<V>(b[10]);
+ t[3] += static_cast<V>(b[11]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[12]);
+ t[1] += static_cast<V>(a[13]);
+ t[2] += static_cast<V>(b[12]);
+ t[3] += static_cast<V>(b[13]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[14]);
+ t[1] += static_cast<V>(a[15]);
+ t[2] += static_cast<V>(b[14]);
+ t[3] += static_cast<V>(b[15]);
+ t[0] *= z;
+ t[2] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<17>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[16] * x2 + a[14];
+ t[1] = a[15] * x2 + a[13];
+ t[2] = b[16] * x2 + b[14];
+ t[3] = b[15] * x2 + b[13];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[12]);
+ t[1] += static_cast<V>(a[11]);
+ t[2] += static_cast<V>(b[12]);
+ t[3] += static_cast<V>(b[11]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[10]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[2] += static_cast<V>(b[2]);
+ t[3] += static_cast<V>(b[1]);
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[11]);
+ t[2] += static_cast<V>(b[10]);
+ t[3] += static_cast<V>(b[11]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[12]);
+ t[1] += static_cast<V>(a[13]);
+ t[2] += static_cast<V>(b[12]);
+ t[3] += static_cast<V>(b[13]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[14]);
+ t[1] += static_cast<V>(a[15]);
+ t[2] += static_cast<V>(b[14]);
+ t[3] += static_cast<V>(b[15]);
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[16]);
+ t[2] += static_cast<V>(b[16]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<18>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[17] * x2 + a[15];
+ t[1] = a[16] * x2 + a[14];
+ t[2] = b[17] * x2 + b[15];
+ t[3] = b[16] * x2 + b[14];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[13]);
+ t[1] += static_cast<V>(a[12]);
+ t[2] += static_cast<V>(b[13]);
+ t[3] += static_cast<V>(b[12]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[11]);
+ t[1] += static_cast<V>(a[10]);
+ t[2] += static_cast<V>(b[11]);
+ t[3] += static_cast<V>(b[10]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[9]);
+ t[1] += static_cast<V>(a[8]);
+ t[2] += static_cast<V>(b[9]);
+ t[3] += static_cast<V>(b[8]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[7]);
+ t[1] += static_cast<V>(a[6]);
+ t[2] += static_cast<V>(b[7]);
+ t[3] += static_cast<V>(b[6]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[2] += static_cast<V>(b[5]);
+ t[3] += static_cast<V>(b[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[2] += static_cast<V>(b[3]);
+ t[3] += static_cast<V>(b[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[1]);
+ t[3] += static_cast<V>(b[0]);
+ t[0] *= x;
+ t[2] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[11]);
+ t[2] += static_cast<V>(b[10]);
+ t[3] += static_cast<V>(b[11]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[12]);
+ t[1] += static_cast<V>(a[13]);
+ t[2] += static_cast<V>(b[12]);
+ t[3] += static_cast<V>(b[13]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[14]);
+ t[1] += static_cast<V>(a[15]);
+ t[2] += static_cast<V>(b[14]);
+ t[3] += static_cast<V>(b[15]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[16]);
+ t[1] += static_cast<V>(a[17]);
+ t[2] += static_cast<V>(b[16]);
+ t[3] += static_cast<V>(b[17]);
+ t[0] *= z;
+ t[2] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_19.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_19.hpp
new file mode 100644
index 00000000000..c111b68f1ef
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_19.hpp
@@ -0,0 +1,1458 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_RAT_EVAL_19_HPP
+#define BOOST_MATH_TOOLS_RAT_EVAL_19_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T*, const U*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]) / static_cast<V>(b[0]);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>((a[1] * x + a[0]) / (b[1] * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<5>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[4] * x2 + a[2];
+ t[1] = a[3] * x2 + a[1];
+ t[2] = b[4] * x2 + b[2];
+ t[3] = b[3] * x2 + b[1];
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[2] += static_cast<V>(b[4]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<6>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[5] * x2 + a[3];
+ t[1] = a[4] * x2 + a[2];
+ t[2] = b[5] * x2 + b[3];
+ t[3] = b[4] * x2 + b[2];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[1]);
+ t[3] += static_cast<V>(b[0]);
+ t[0] *= x;
+ t[2] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z;
+ t[2] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<7>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[6] * x2 + a[4];
+ t[1] = a[5] * x2 + a[3];
+ t[2] = b[6] * x2 + b[4];
+ t[3] = b[5] * x2 + b[3];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[2] += static_cast<V>(b[2]);
+ t[3] += static_cast<V>(b[1]);
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[2] += static_cast<V>(b[6]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<8>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[7] * x2 + a[5];
+ t[1] = a[6] * x2 + a[4];
+ t[2] = b[7] * x2 + b[5];
+ t[3] = b[6] * x2 + b[4];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[2] += static_cast<V>(b[3]);
+ t[3] += static_cast<V>(b[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[1]);
+ t[3] += static_cast<V>(b[0]);
+ t[0] *= x;
+ t[2] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z;
+ t[2] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<9>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[8] * x2 + a[6];
+ t[1] = a[7] * x2 + a[5];
+ t[2] = b[8] * x2 + b[6];
+ t[3] = b[7] * x2 + b[5];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[2] += static_cast<V>(b[2]);
+ t[3] += static_cast<V>(b[1]);
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[2] += static_cast<V>(b[8]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<10>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[9] * x2 + a[7];
+ t[1] = a[8] * x2 + a[6];
+ t[2] = b[9] * x2 + b[7];
+ t[3] = b[8] * x2 + b[6];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[2] += static_cast<V>(b[5]);
+ t[3] += static_cast<V>(b[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[2] += static_cast<V>(b[3]);
+ t[3] += static_cast<V>(b[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[1]);
+ t[3] += static_cast<V>(b[0]);
+ t[0] *= x;
+ t[2] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= z;
+ t[2] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<11>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[10] * x2 + a[8];
+ t[1] = a[9] * x2 + a[7];
+ t[2] = b[10] * x2 + b[8];
+ t[3] = b[9] * x2 + b[7];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[2] += static_cast<V>(b[2]);
+ t[3] += static_cast<V>(b[1]);
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[10]);
+ t[2] += static_cast<V>(b[10]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<12>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[11] * x2 + a[9];
+ t[1] = a[10] * x2 + a[8];
+ t[2] = b[11] * x2 + b[9];
+ t[3] = b[10] * x2 + b[8];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[7]);
+ t[1] += static_cast<V>(a[6]);
+ t[2] += static_cast<V>(b[7]);
+ t[3] += static_cast<V>(b[6]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[2] += static_cast<V>(b[5]);
+ t[3] += static_cast<V>(b[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[2] += static_cast<V>(b[3]);
+ t[3] += static_cast<V>(b[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[1]);
+ t[3] += static_cast<V>(b[0]);
+ t[0] *= x;
+ t[2] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[11]);
+ t[2] += static_cast<V>(b[10]);
+ t[3] += static_cast<V>(b[11]);
+ t[0] *= z;
+ t[2] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<13>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[12] * x2 + a[10];
+ t[1] = a[11] * x2 + a[9];
+ t[2] = b[12] * x2 + b[10];
+ t[3] = b[11] * x2 + b[9];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[2] += static_cast<V>(b[2]);
+ t[3] += static_cast<V>(b[1]);
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[11]);
+ t[2] += static_cast<V>(b[10]);
+ t[3] += static_cast<V>(b[11]);
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[12]);
+ t[2] += static_cast<V>(b[12]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<14>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[13] * x2 + a[11];
+ t[1] = a[12] * x2 + a[10];
+ t[2] = b[13] * x2 + b[11];
+ t[3] = b[12] * x2 + b[10];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[9]);
+ t[1] += static_cast<V>(a[8]);
+ t[2] += static_cast<V>(b[9]);
+ t[3] += static_cast<V>(b[8]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[7]);
+ t[1] += static_cast<V>(a[6]);
+ t[2] += static_cast<V>(b[7]);
+ t[3] += static_cast<V>(b[6]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[2] += static_cast<V>(b[5]);
+ t[3] += static_cast<V>(b[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[2] += static_cast<V>(b[3]);
+ t[3] += static_cast<V>(b[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[1]);
+ t[3] += static_cast<V>(b[0]);
+ t[0] *= x;
+ t[2] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[11]);
+ t[2] += static_cast<V>(b[10]);
+ t[3] += static_cast<V>(b[11]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[12]);
+ t[1] += static_cast<V>(a[13]);
+ t[2] += static_cast<V>(b[12]);
+ t[3] += static_cast<V>(b[13]);
+ t[0] *= z;
+ t[2] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<15>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[14] * x2 + a[12];
+ t[1] = a[13] * x2 + a[11];
+ t[2] = b[14] * x2 + b[12];
+ t[3] = b[13] * x2 + b[11];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[10]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[2] += static_cast<V>(b[2]);
+ t[3] += static_cast<V>(b[1]);
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[11]);
+ t[2] += static_cast<V>(b[10]);
+ t[3] += static_cast<V>(b[11]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[12]);
+ t[1] += static_cast<V>(a[13]);
+ t[2] += static_cast<V>(b[12]);
+ t[3] += static_cast<V>(b[13]);
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[14]);
+ t[2] += static_cast<V>(b[14]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<16>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[15] * x2 + a[13];
+ t[1] = a[14] * x2 + a[12];
+ t[2] = b[15] * x2 + b[13];
+ t[3] = b[14] * x2 + b[12];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[11]);
+ t[1] += static_cast<V>(a[10]);
+ t[2] += static_cast<V>(b[11]);
+ t[3] += static_cast<V>(b[10]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[9]);
+ t[1] += static_cast<V>(a[8]);
+ t[2] += static_cast<V>(b[9]);
+ t[3] += static_cast<V>(b[8]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[7]);
+ t[1] += static_cast<V>(a[6]);
+ t[2] += static_cast<V>(b[7]);
+ t[3] += static_cast<V>(b[6]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[2] += static_cast<V>(b[5]);
+ t[3] += static_cast<V>(b[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[2] += static_cast<V>(b[3]);
+ t[3] += static_cast<V>(b[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[1]);
+ t[3] += static_cast<V>(b[0]);
+ t[0] *= x;
+ t[2] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[11]);
+ t[2] += static_cast<V>(b[10]);
+ t[3] += static_cast<V>(b[11]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[12]);
+ t[1] += static_cast<V>(a[13]);
+ t[2] += static_cast<V>(b[12]);
+ t[3] += static_cast<V>(b[13]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[14]);
+ t[1] += static_cast<V>(a[15]);
+ t[2] += static_cast<V>(b[14]);
+ t[3] += static_cast<V>(b[15]);
+ t[0] *= z;
+ t[2] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<17>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[16] * x2 + a[14];
+ t[1] = a[15] * x2 + a[13];
+ t[2] = b[16] * x2 + b[14];
+ t[3] = b[15] * x2 + b[13];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[12]);
+ t[1] += static_cast<V>(a[11]);
+ t[2] += static_cast<V>(b[12]);
+ t[3] += static_cast<V>(b[11]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[10]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[2] += static_cast<V>(b[2]);
+ t[3] += static_cast<V>(b[1]);
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[11]);
+ t[2] += static_cast<V>(b[10]);
+ t[3] += static_cast<V>(b[11]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[12]);
+ t[1] += static_cast<V>(a[13]);
+ t[2] += static_cast<V>(b[12]);
+ t[3] += static_cast<V>(b[13]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[14]);
+ t[1] += static_cast<V>(a[15]);
+ t[2] += static_cast<V>(b[14]);
+ t[3] += static_cast<V>(b[15]);
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[16]);
+ t[2] += static_cast<V>(b[16]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<18>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[17] * x2 + a[15];
+ t[1] = a[16] * x2 + a[14];
+ t[2] = b[17] * x2 + b[15];
+ t[3] = b[16] * x2 + b[14];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[13]);
+ t[1] += static_cast<V>(a[12]);
+ t[2] += static_cast<V>(b[13]);
+ t[3] += static_cast<V>(b[12]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[11]);
+ t[1] += static_cast<V>(a[10]);
+ t[2] += static_cast<V>(b[11]);
+ t[3] += static_cast<V>(b[10]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[9]);
+ t[1] += static_cast<V>(a[8]);
+ t[2] += static_cast<V>(b[9]);
+ t[3] += static_cast<V>(b[8]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[7]);
+ t[1] += static_cast<V>(a[6]);
+ t[2] += static_cast<V>(b[7]);
+ t[3] += static_cast<V>(b[6]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[2] += static_cast<V>(b[5]);
+ t[3] += static_cast<V>(b[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[2] += static_cast<V>(b[3]);
+ t[3] += static_cast<V>(b[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[1]);
+ t[3] += static_cast<V>(b[0]);
+ t[0] *= x;
+ t[2] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[11]);
+ t[2] += static_cast<V>(b[10]);
+ t[3] += static_cast<V>(b[11]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[12]);
+ t[1] += static_cast<V>(a[13]);
+ t[2] += static_cast<V>(b[12]);
+ t[3] += static_cast<V>(b[13]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[14]);
+ t[1] += static_cast<V>(a[15]);
+ t[2] += static_cast<V>(b[14]);
+ t[3] += static_cast<V>(b[15]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[16]);
+ t[1] += static_cast<V>(a[17]);
+ t[2] += static_cast<V>(b[16]);
+ t[3] += static_cast<V>(b[17]);
+ t[0] *= z;
+ t[2] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<19>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[18] * x2 + a[16];
+ t[1] = a[17] * x2 + a[15];
+ t[2] = b[18] * x2 + b[16];
+ t[3] = b[17] * x2 + b[15];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[14]);
+ t[1] += static_cast<V>(a[13]);
+ t[2] += static_cast<V>(b[14]);
+ t[3] += static_cast<V>(b[13]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[12]);
+ t[1] += static_cast<V>(a[11]);
+ t[2] += static_cast<V>(b[12]);
+ t[3] += static_cast<V>(b[11]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[10]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[2] += static_cast<V>(b[2]);
+ t[3] += static_cast<V>(b[1]);
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[11]);
+ t[2] += static_cast<V>(b[10]);
+ t[3] += static_cast<V>(b[11]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[12]);
+ t[1] += static_cast<V>(a[13]);
+ t[2] += static_cast<V>(b[12]);
+ t[3] += static_cast<V>(b[13]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[14]);
+ t[1] += static_cast<V>(a[15]);
+ t[2] += static_cast<V>(b[14]);
+ t[3] += static_cast<V>(b[15]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[16]);
+ t[1] += static_cast<V>(a[17]);
+ t[2] += static_cast<V>(b[16]);
+ t[3] += static_cast<V>(b[17]);
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[18]);
+ t[2] += static_cast<V>(b[18]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_2.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_2.hpp
new file mode 100644
index 00000000000..35b5abb3546
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_2.hpp
@@ -0,0 +1,48 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_RAT_EVAL_2_HPP
+#define BOOST_MATH_TOOLS_RAT_EVAL_2_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T*, const U*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]) / static_cast<V>(b[0]);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>((a[1] * x + a[0]) / (b[1] * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0]));
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_20.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_20.hpp
new file mode 100644
index 00000000000..7bee9b110a8
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_20.hpp
@@ -0,0 +1,1616 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_RAT_EVAL_20_HPP
+#define BOOST_MATH_TOOLS_RAT_EVAL_20_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T*, const U*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]) / static_cast<V>(b[0]);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>((a[1] * x + a[0]) / (b[1] * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<5>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[4] * x2 + a[2];
+ t[1] = a[3] * x2 + a[1];
+ t[2] = b[4] * x2 + b[2];
+ t[3] = b[3] * x2 + b[1];
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[2] += static_cast<V>(b[4]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<6>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[5] * x2 + a[3];
+ t[1] = a[4] * x2 + a[2];
+ t[2] = b[5] * x2 + b[3];
+ t[3] = b[4] * x2 + b[2];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[1]);
+ t[3] += static_cast<V>(b[0]);
+ t[0] *= x;
+ t[2] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z;
+ t[2] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<7>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[6] * x2 + a[4];
+ t[1] = a[5] * x2 + a[3];
+ t[2] = b[6] * x2 + b[4];
+ t[3] = b[5] * x2 + b[3];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[2] += static_cast<V>(b[2]);
+ t[3] += static_cast<V>(b[1]);
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[2] += static_cast<V>(b[6]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<8>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[7] * x2 + a[5];
+ t[1] = a[6] * x2 + a[4];
+ t[2] = b[7] * x2 + b[5];
+ t[3] = b[6] * x2 + b[4];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[2] += static_cast<V>(b[3]);
+ t[3] += static_cast<V>(b[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[1]);
+ t[3] += static_cast<V>(b[0]);
+ t[0] *= x;
+ t[2] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z;
+ t[2] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<9>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[8] * x2 + a[6];
+ t[1] = a[7] * x2 + a[5];
+ t[2] = b[8] * x2 + b[6];
+ t[3] = b[7] * x2 + b[5];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[2] += static_cast<V>(b[2]);
+ t[3] += static_cast<V>(b[1]);
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[2] += static_cast<V>(b[8]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<10>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[9] * x2 + a[7];
+ t[1] = a[8] * x2 + a[6];
+ t[2] = b[9] * x2 + b[7];
+ t[3] = b[8] * x2 + b[6];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[2] += static_cast<V>(b[5]);
+ t[3] += static_cast<V>(b[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[2] += static_cast<V>(b[3]);
+ t[3] += static_cast<V>(b[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[1]);
+ t[3] += static_cast<V>(b[0]);
+ t[0] *= x;
+ t[2] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= z;
+ t[2] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<11>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[10] * x2 + a[8];
+ t[1] = a[9] * x2 + a[7];
+ t[2] = b[10] * x2 + b[8];
+ t[3] = b[9] * x2 + b[7];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[2] += static_cast<V>(b[2]);
+ t[3] += static_cast<V>(b[1]);
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[10]);
+ t[2] += static_cast<V>(b[10]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<12>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[11] * x2 + a[9];
+ t[1] = a[10] * x2 + a[8];
+ t[2] = b[11] * x2 + b[9];
+ t[3] = b[10] * x2 + b[8];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[7]);
+ t[1] += static_cast<V>(a[6]);
+ t[2] += static_cast<V>(b[7]);
+ t[3] += static_cast<V>(b[6]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[2] += static_cast<V>(b[5]);
+ t[3] += static_cast<V>(b[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[2] += static_cast<V>(b[3]);
+ t[3] += static_cast<V>(b[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[1]);
+ t[3] += static_cast<V>(b[0]);
+ t[0] *= x;
+ t[2] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[11]);
+ t[2] += static_cast<V>(b[10]);
+ t[3] += static_cast<V>(b[11]);
+ t[0] *= z;
+ t[2] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<13>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[12] * x2 + a[10];
+ t[1] = a[11] * x2 + a[9];
+ t[2] = b[12] * x2 + b[10];
+ t[3] = b[11] * x2 + b[9];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[2] += static_cast<V>(b[2]);
+ t[3] += static_cast<V>(b[1]);
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[11]);
+ t[2] += static_cast<V>(b[10]);
+ t[3] += static_cast<V>(b[11]);
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[12]);
+ t[2] += static_cast<V>(b[12]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<14>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[13] * x2 + a[11];
+ t[1] = a[12] * x2 + a[10];
+ t[2] = b[13] * x2 + b[11];
+ t[3] = b[12] * x2 + b[10];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[9]);
+ t[1] += static_cast<V>(a[8]);
+ t[2] += static_cast<V>(b[9]);
+ t[3] += static_cast<V>(b[8]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[7]);
+ t[1] += static_cast<V>(a[6]);
+ t[2] += static_cast<V>(b[7]);
+ t[3] += static_cast<V>(b[6]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[2] += static_cast<V>(b[5]);
+ t[3] += static_cast<V>(b[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[2] += static_cast<V>(b[3]);
+ t[3] += static_cast<V>(b[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[1]);
+ t[3] += static_cast<V>(b[0]);
+ t[0] *= x;
+ t[2] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[11]);
+ t[2] += static_cast<V>(b[10]);
+ t[3] += static_cast<V>(b[11]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[12]);
+ t[1] += static_cast<V>(a[13]);
+ t[2] += static_cast<V>(b[12]);
+ t[3] += static_cast<V>(b[13]);
+ t[0] *= z;
+ t[2] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<15>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[14] * x2 + a[12];
+ t[1] = a[13] * x2 + a[11];
+ t[2] = b[14] * x2 + b[12];
+ t[3] = b[13] * x2 + b[11];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[10]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[2] += static_cast<V>(b[2]);
+ t[3] += static_cast<V>(b[1]);
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[11]);
+ t[2] += static_cast<V>(b[10]);
+ t[3] += static_cast<V>(b[11]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[12]);
+ t[1] += static_cast<V>(a[13]);
+ t[2] += static_cast<V>(b[12]);
+ t[3] += static_cast<V>(b[13]);
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[14]);
+ t[2] += static_cast<V>(b[14]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<16>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[15] * x2 + a[13];
+ t[1] = a[14] * x2 + a[12];
+ t[2] = b[15] * x2 + b[13];
+ t[3] = b[14] * x2 + b[12];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[11]);
+ t[1] += static_cast<V>(a[10]);
+ t[2] += static_cast<V>(b[11]);
+ t[3] += static_cast<V>(b[10]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[9]);
+ t[1] += static_cast<V>(a[8]);
+ t[2] += static_cast<V>(b[9]);
+ t[3] += static_cast<V>(b[8]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[7]);
+ t[1] += static_cast<V>(a[6]);
+ t[2] += static_cast<V>(b[7]);
+ t[3] += static_cast<V>(b[6]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[2] += static_cast<V>(b[5]);
+ t[3] += static_cast<V>(b[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[2] += static_cast<V>(b[3]);
+ t[3] += static_cast<V>(b[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[1]);
+ t[3] += static_cast<V>(b[0]);
+ t[0] *= x;
+ t[2] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[11]);
+ t[2] += static_cast<V>(b[10]);
+ t[3] += static_cast<V>(b[11]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[12]);
+ t[1] += static_cast<V>(a[13]);
+ t[2] += static_cast<V>(b[12]);
+ t[3] += static_cast<V>(b[13]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[14]);
+ t[1] += static_cast<V>(a[15]);
+ t[2] += static_cast<V>(b[14]);
+ t[3] += static_cast<V>(b[15]);
+ t[0] *= z;
+ t[2] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<17>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[16] * x2 + a[14];
+ t[1] = a[15] * x2 + a[13];
+ t[2] = b[16] * x2 + b[14];
+ t[3] = b[15] * x2 + b[13];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[12]);
+ t[1] += static_cast<V>(a[11]);
+ t[2] += static_cast<V>(b[12]);
+ t[3] += static_cast<V>(b[11]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[10]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[2] += static_cast<V>(b[2]);
+ t[3] += static_cast<V>(b[1]);
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[11]);
+ t[2] += static_cast<V>(b[10]);
+ t[3] += static_cast<V>(b[11]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[12]);
+ t[1] += static_cast<V>(a[13]);
+ t[2] += static_cast<V>(b[12]);
+ t[3] += static_cast<V>(b[13]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[14]);
+ t[1] += static_cast<V>(a[15]);
+ t[2] += static_cast<V>(b[14]);
+ t[3] += static_cast<V>(b[15]);
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[16]);
+ t[2] += static_cast<V>(b[16]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<18>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[17] * x2 + a[15];
+ t[1] = a[16] * x2 + a[14];
+ t[2] = b[17] * x2 + b[15];
+ t[3] = b[16] * x2 + b[14];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[13]);
+ t[1] += static_cast<V>(a[12]);
+ t[2] += static_cast<V>(b[13]);
+ t[3] += static_cast<V>(b[12]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[11]);
+ t[1] += static_cast<V>(a[10]);
+ t[2] += static_cast<V>(b[11]);
+ t[3] += static_cast<V>(b[10]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[9]);
+ t[1] += static_cast<V>(a[8]);
+ t[2] += static_cast<V>(b[9]);
+ t[3] += static_cast<V>(b[8]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[7]);
+ t[1] += static_cast<V>(a[6]);
+ t[2] += static_cast<V>(b[7]);
+ t[3] += static_cast<V>(b[6]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[2] += static_cast<V>(b[5]);
+ t[3] += static_cast<V>(b[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[2] += static_cast<V>(b[3]);
+ t[3] += static_cast<V>(b[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[1]);
+ t[3] += static_cast<V>(b[0]);
+ t[0] *= x;
+ t[2] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[11]);
+ t[2] += static_cast<V>(b[10]);
+ t[3] += static_cast<V>(b[11]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[12]);
+ t[1] += static_cast<V>(a[13]);
+ t[2] += static_cast<V>(b[12]);
+ t[3] += static_cast<V>(b[13]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[14]);
+ t[1] += static_cast<V>(a[15]);
+ t[2] += static_cast<V>(b[14]);
+ t[3] += static_cast<V>(b[15]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[16]);
+ t[1] += static_cast<V>(a[17]);
+ t[2] += static_cast<V>(b[16]);
+ t[3] += static_cast<V>(b[17]);
+ t[0] *= z;
+ t[2] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<19>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[18] * x2 + a[16];
+ t[1] = a[17] * x2 + a[15];
+ t[2] = b[18] * x2 + b[16];
+ t[3] = b[17] * x2 + b[15];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[14]);
+ t[1] += static_cast<V>(a[13]);
+ t[2] += static_cast<V>(b[14]);
+ t[3] += static_cast<V>(b[13]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[12]);
+ t[1] += static_cast<V>(a[11]);
+ t[2] += static_cast<V>(b[12]);
+ t[3] += static_cast<V>(b[11]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[10]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[2] += static_cast<V>(b[2]);
+ t[3] += static_cast<V>(b[1]);
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[11]);
+ t[2] += static_cast<V>(b[10]);
+ t[3] += static_cast<V>(b[11]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[12]);
+ t[1] += static_cast<V>(a[13]);
+ t[2] += static_cast<V>(b[12]);
+ t[3] += static_cast<V>(b[13]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[14]);
+ t[1] += static_cast<V>(a[15]);
+ t[2] += static_cast<V>(b[14]);
+ t[3] += static_cast<V>(b[15]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[16]);
+ t[1] += static_cast<V>(a[17]);
+ t[2] += static_cast<V>(b[16]);
+ t[3] += static_cast<V>(b[17]);
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[18]);
+ t[2] += static_cast<V>(b[18]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<20>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[19] * x2 + a[17];
+ t[1] = a[18] * x2 + a[16];
+ t[2] = b[19] * x2 + b[17];
+ t[3] = b[18] * x2 + b[16];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[15]);
+ t[1] += static_cast<V>(a[14]);
+ t[2] += static_cast<V>(b[15]);
+ t[3] += static_cast<V>(b[14]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[13]);
+ t[1] += static_cast<V>(a[12]);
+ t[2] += static_cast<V>(b[13]);
+ t[3] += static_cast<V>(b[12]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[11]);
+ t[1] += static_cast<V>(a[10]);
+ t[2] += static_cast<V>(b[11]);
+ t[3] += static_cast<V>(b[10]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[9]);
+ t[1] += static_cast<V>(a[8]);
+ t[2] += static_cast<V>(b[9]);
+ t[3] += static_cast<V>(b[8]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[7]);
+ t[1] += static_cast<V>(a[6]);
+ t[2] += static_cast<V>(b[7]);
+ t[3] += static_cast<V>(b[6]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[5]);
+ t[1] += static_cast<V>(a[4]);
+ t[2] += static_cast<V>(b[5]);
+ t[3] += static_cast<V>(b[4]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[2] += static_cast<V>(b[3]);
+ t[3] += static_cast<V>(b[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[1]);
+ t[3] += static_cast<V>(b[0]);
+ t[0] *= x;
+ t[2] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[1] += static_cast<V>(a[9]);
+ t[2] += static_cast<V>(b[8]);
+ t[3] += static_cast<V>(b[9]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[10]);
+ t[1] += static_cast<V>(a[11]);
+ t[2] += static_cast<V>(b[10]);
+ t[3] += static_cast<V>(b[11]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[12]);
+ t[1] += static_cast<V>(a[13]);
+ t[2] += static_cast<V>(b[12]);
+ t[3] += static_cast<V>(b[13]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[14]);
+ t[1] += static_cast<V>(a[15]);
+ t[2] += static_cast<V>(b[14]);
+ t[3] += static_cast<V>(b[15]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[16]);
+ t[1] += static_cast<V>(a[17]);
+ t[2] += static_cast<V>(b[16]);
+ t[3] += static_cast<V>(b[17]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[18]);
+ t[1] += static_cast<V>(a[19]);
+ t[2] += static_cast<V>(b[18]);
+ t[3] += static_cast<V>(b[19]);
+ t[0] *= z;
+ t[2] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_3.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_3.hpp
new file mode 100644
index 00000000000..8838ac13e61
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_3.hpp
@@ -0,0 +1,48 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_RAT_EVAL_3_HPP
+#define BOOST_MATH_TOOLS_RAT_EVAL_3_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T*, const U*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]) / static_cast<V>(b[0]);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>((a[1] * x + a[0]) / (b[1] * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0]));
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_4.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_4.hpp
new file mode 100644
index 00000000000..5fe5ada83b6
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_4.hpp
@@ -0,0 +1,48 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_RAT_EVAL_4_HPP
+#define BOOST_MATH_TOOLS_RAT_EVAL_4_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T*, const U*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]) / static_cast<V>(b[0]);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>((a[1] * x + a[0]) / (b[1] * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0]));
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_5.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_5.hpp
new file mode 100644
index 00000000000..23a606855b6
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_5.hpp
@@ -0,0 +1,86 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_RAT_EVAL_5_HPP
+#define BOOST_MATH_TOOLS_RAT_EVAL_5_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T*, const U*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]) / static_cast<V>(b[0]);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>((a[1] * x + a[0]) / (b[1] * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<5>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[4] * x2 + a[2];
+ t[1] = a[3] * x2 + a[1];
+ t[2] = b[4] * x2 + b[2];
+ t[3] = b[3] * x2 + b[1];
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[2] += static_cast<V>(b[4]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_6.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_6.hpp
new file mode 100644
index 00000000000..186167d614f
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_6.hpp
@@ -0,0 +1,132 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_RAT_EVAL_6_HPP
+#define BOOST_MATH_TOOLS_RAT_EVAL_6_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T*, const U*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]) / static_cast<V>(b[0]);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>((a[1] * x + a[0]) / (b[1] * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<5>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[4] * x2 + a[2];
+ t[1] = a[3] * x2 + a[1];
+ t[2] = b[4] * x2 + b[2];
+ t[3] = b[3] * x2 + b[1];
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[2] += static_cast<V>(b[4]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<6>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[5] * x2 + a[3];
+ t[1] = a[4] * x2 + a[2];
+ t[2] = b[5] * x2 + b[3];
+ t[3] = b[4] * x2 + b[2];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[1]);
+ t[3] += static_cast<V>(b[0]);
+ t[0] *= x;
+ t[2] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z;
+ t[2] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_7.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_7.hpp
new file mode 100644
index 00000000000..e08dce62d7d
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_7.hpp
@@ -0,0 +1,186 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_RAT_EVAL_7_HPP
+#define BOOST_MATH_TOOLS_RAT_EVAL_7_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T*, const U*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]) / static_cast<V>(b[0]);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>((a[1] * x + a[0]) / (b[1] * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<5>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[4] * x2 + a[2];
+ t[1] = a[3] * x2 + a[1];
+ t[2] = b[4] * x2 + b[2];
+ t[3] = b[3] * x2 + b[1];
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[2] += static_cast<V>(b[4]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<6>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[5] * x2 + a[3];
+ t[1] = a[4] * x2 + a[2];
+ t[2] = b[5] * x2 + b[3];
+ t[3] = b[4] * x2 + b[2];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[1]);
+ t[3] += static_cast<V>(b[0]);
+ t[0] *= x;
+ t[2] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z;
+ t[2] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<7>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[6] * x2 + a[4];
+ t[1] = a[5] * x2 + a[3];
+ t[2] = b[6] * x2 + b[4];
+ t[3] = b[5] * x2 + b[3];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[2] += static_cast<V>(b[2]);
+ t[3] += static_cast<V>(b[1]);
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[2] += static_cast<V>(b[6]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_8.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_8.hpp
new file mode 100644
index 00000000000..3ceb7174398
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_8.hpp
@@ -0,0 +1,248 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_RAT_EVAL_8_HPP
+#define BOOST_MATH_TOOLS_RAT_EVAL_8_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T*, const U*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]) / static_cast<V>(b[0]);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>((a[1] * x + a[0]) / (b[1] * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<5>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[4] * x2 + a[2];
+ t[1] = a[3] * x2 + a[1];
+ t[2] = b[4] * x2 + b[2];
+ t[3] = b[3] * x2 + b[1];
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[2] += static_cast<V>(b[4]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<6>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[5] * x2 + a[3];
+ t[1] = a[4] * x2 + a[2];
+ t[2] = b[5] * x2 + b[3];
+ t[3] = b[4] * x2 + b[2];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[1]);
+ t[3] += static_cast<V>(b[0]);
+ t[0] *= x;
+ t[2] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z;
+ t[2] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<7>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[6] * x2 + a[4];
+ t[1] = a[5] * x2 + a[3];
+ t[2] = b[6] * x2 + b[4];
+ t[3] = b[5] * x2 + b[3];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[2] += static_cast<V>(b[2]);
+ t[3] += static_cast<V>(b[1]);
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[2] += static_cast<V>(b[6]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<8>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[7] * x2 + a[5];
+ t[1] = a[6] * x2 + a[4];
+ t[2] = b[7] * x2 + b[5];
+ t[3] = b[6] * x2 + b[4];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[2] += static_cast<V>(b[3]);
+ t[3] += static_cast<V>(b[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[1]);
+ t[3] += static_cast<V>(b[0]);
+ t[0] *= x;
+ t[2] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z;
+ t[2] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_9.hpp b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_9.hpp
new file mode 100644
index 00000000000..94dab4c0db9
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/detail/rational_horner3_9.hpp
@@ -0,0 +1,318 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file is machine generated, do not edit by hand
+
+// Polynomial evaluation using second order Horners rule
+#ifndef BOOST_MATH_TOOLS_RAT_EVAL_9_HPP
+#define BOOST_MATH_TOOLS_RAT_EVAL_9_HPP
+
+namespace boost{ namespace math{ namespace tools{ namespace detail{
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T*, const U*, const V&, const mpl::int_<0>*)
+{
+ return static_cast<V>(0);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const mpl::int_<1>*)
+{
+ return static_cast<V>(a[0]) / static_cast<V>(b[0]);
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<2>*)
+{
+ return static_cast<V>((a[1] * x + a[0]) / (b[1] * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<3>*)
+{
+ return static_cast<V>(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<4>*)
+{
+ return static_cast<V>((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0]));
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<5>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[4] * x2 + a[2];
+ t[1] = a[3] * x2 + a[1];
+ t[2] = b[4] * x2 + b[2];
+ t[3] = b[3] * x2 + b[1];
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[2] += static_cast<V>(b[4]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<6>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[5] * x2 + a[3];
+ t[1] = a[4] * x2 + a[2];
+ t[2] = b[5] * x2 + b[3];
+ t[3] = b[4] * x2 + b[2];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[1]);
+ t[3] += static_cast<V>(b[0]);
+ t[0] *= x;
+ t[2] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z;
+ t[2] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<7>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[6] * x2 + a[4];
+ t[1] = a[5] * x2 + a[3];
+ t[2] = b[6] * x2 + b[4];
+ t[3] = b[5] * x2 + b[3];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[2] += static_cast<V>(b[2]);
+ t[3] += static_cast<V>(b[1]);
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[2] += static_cast<V>(b[6]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<8>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[7] * x2 + a[5];
+ t[1] = a[6] * x2 + a[4];
+ t[2] = b[7] * x2 + b[5];
+ t[3] = b[6] * x2 + b[4];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[3]);
+ t[1] += static_cast<V>(a[2]);
+ t[2] += static_cast<V>(b[3]);
+ t[3] += static_cast<V>(b[2]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[1]);
+ t[1] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[1]);
+ t[3] += static_cast<V>(b[0]);
+ t[0] *= x;
+ t[2] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z;
+ t[2] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+template <class T, class U, class V>
+inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<9>*)
+{
+ if(x <= 1)
+ {
+ V x2 = x * x;
+ V t[4];
+ t[0] = a[8] * x2 + a[6];
+ t[1] = a[7] * x2 + a[5];
+ t[2] = b[8] * x2 + b[6];
+ t[3] = b[7] * x2 + b[5];
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[3]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[3]);
+ t[0] *= x2;
+ t[1] *= x2;
+ t[2] *= x2;
+ t[3] *= x2;
+ t[0] += static_cast<V>(a[2]);
+ t[1] += static_cast<V>(a[1]);
+ t[2] += static_cast<V>(b[2]);
+ t[3] += static_cast<V>(b[1]);
+ t[0] *= x2;
+ t[2] *= x2;
+ t[0] += static_cast<V>(a[0]);
+ t[2] += static_cast<V>(b[0]);
+ t[1] *= x;
+ t[3] *= x;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+ else
+ {
+ V z = 1 / x;
+ V z2 = 1 / (x * x);
+ V t[4];
+ t[0] = a[0] * z2 + a[2];
+ t[1] = a[1] * z2 + a[3];
+ t[2] = b[0] * z2 + b[2];
+ t[3] = b[1] * z2 + b[3];
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[4]);
+ t[1] += static_cast<V>(a[5]);
+ t[2] += static_cast<V>(b[4]);
+ t[3] += static_cast<V>(b[5]);
+ t[0] *= z2;
+ t[1] *= z2;
+ t[2] *= z2;
+ t[3] *= z2;
+ t[0] += static_cast<V>(a[6]);
+ t[1] += static_cast<V>(a[7]);
+ t[2] += static_cast<V>(b[6]);
+ t[3] += static_cast<V>(b[7]);
+ t[0] *= z2;
+ t[2] *= z2;
+ t[0] += static_cast<V>(a[8]);
+ t[2] += static_cast<V>(b[8]);
+ t[1] *= z;
+ t[3] *= z;
+ return (t[0] + t[1]) / (t[2] + t[3]);
+ }
+}
+
+
+}}}} // namespaces
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/fraction.hpp b/src/third_party/boost-1.56.0/boost/math/tools/fraction.hpp
new file mode 100644
index 00000000000..b245ddd2a36
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/fraction.hpp
@@ -0,0 +1,252 @@
+// (C) Copyright John Maddock 2005-2006.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_MATH_TOOLS_FRACTION_INCLUDED
+#define BOOST_MATH_TOOLS_FRACTION_INCLUDED
+
+#ifdef _MSC_VER
+#pragma once
+#endif
+
+#include <boost/config/no_tr1/cmath.hpp>
+#include <boost/cstdint.hpp>
+#include <boost/type_traits/integral_constant.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/math/tools/precision.hpp>
+
+namespace boost{ namespace math{ namespace tools{
+
+namespace detail
+{
+
+ template <class T>
+ struct is_pair : public boost::false_type{};
+
+ template <class T, class U>
+ struct is_pair<std::pair<T,U> > : public boost::true_type{};
+
+ template <class Gen>
+ struct fraction_traits_simple
+ {
+ typedef typename Gen::result_type result_type;
+ typedef typename Gen::result_type value_type;
+
+ static result_type a(const value_type&)
+ {
+ return 1;
+ }
+ static result_type b(const value_type& v)
+ {
+ return v;
+ }
+ };
+
+ template <class Gen>
+ struct fraction_traits_pair
+ {
+ typedef typename Gen::result_type value_type;
+ typedef typename value_type::first_type result_type;
+
+ static result_type a(const value_type& v)
+ {
+ return v.first;
+ }
+ static result_type b(const value_type& v)
+ {
+ return v.second;
+ }
+ };
+
+ template <class Gen>
+ struct fraction_traits
+ : public boost::mpl::if_c<
+ is_pair<typename Gen::result_type>::value,
+ fraction_traits_pair<Gen>,
+ fraction_traits_simple<Gen> >::type
+ {
+ };
+
+} // namespace detail
+
+//
+// continued_fraction_b
+// Evaluates:
+//
+// b0 + a1
+// ---------------
+// b1 + a2
+// ----------
+// b2 + a3
+// -----
+// b3 + ...
+//
+// Note that the first a0 returned by generator Gen is disarded.
+//
+template <class Gen, class U>
+inline typename detail::fraction_traits<Gen>::result_type continued_fraction_b(Gen& g, const U& factor, boost::uintmax_t& max_terms)
+{
+ BOOST_MATH_STD_USING // ADL of std names
+
+ typedef detail::fraction_traits<Gen> traits;
+ typedef typename traits::result_type result_type;
+ typedef typename traits::value_type value_type;
+
+ result_type tiny = tools::min_value<result_type>();
+
+ value_type v = g();
+
+ result_type f, C, D, delta;
+ f = traits::b(v);
+ if(f == 0)
+ f = tiny;
+ C = f;
+ D = 0;
+
+ boost::uintmax_t counter(max_terms);
+
+ do{
+ v = g();
+ D = traits::b(v) + traits::a(v) * D;
+ if(D == 0)
+ D = tiny;
+ C = traits::b(v) + traits::a(v) / C;
+ if(C == 0)
+ C = tiny;
+ D = 1/D;
+ delta = C*D;
+ f = f * delta;
+ }while((fabs(delta - 1) > factor) && --counter);
+
+ max_terms = max_terms - counter;
+
+ return f;
+}
+
+template <class Gen, class U>
+inline typename detail::fraction_traits<Gen>::result_type continued_fraction_b(Gen& g, const U& factor)
+{
+ boost::uintmax_t max_terms = (std::numeric_limits<boost::uintmax_t>::max)();
+ return continued_fraction_b(g, factor, max_terms);
+}
+
+template <class Gen>
+inline typename detail::fraction_traits<Gen>::result_type continued_fraction_b(Gen& g, int bits)
+{
+ BOOST_MATH_STD_USING // ADL of std names
+
+ typedef detail::fraction_traits<Gen> traits;
+ typedef typename traits::result_type result_type;
+
+ result_type factor = ldexp(1.0f, 1 - bits); // 1 / pow(result_type(2), bits);
+ boost::uintmax_t max_terms = (std::numeric_limits<boost::uintmax_t>::max)();
+ return continued_fraction_b(g, factor, max_terms);
+}
+
+template <class Gen>
+inline typename detail::fraction_traits<Gen>::result_type continued_fraction_b(Gen& g, int bits, boost::uintmax_t& max_terms)
+{
+ BOOST_MATH_STD_USING // ADL of std names
+
+ typedef detail::fraction_traits<Gen> traits;
+ typedef typename traits::result_type result_type;
+
+ result_type factor = ldexp(1.0f, 1 - bits); // 1 / pow(result_type(2), bits);
+ return continued_fraction_b(g, factor, max_terms);
+}
+
+//
+// continued_fraction_a
+// Evaluates:
+//
+// a1
+// ---------------
+// b1 + a2
+// ----------
+// b2 + a3
+// -----
+// b3 + ...
+//
+// Note that the first a1 and b1 returned by generator Gen are both used.
+//
+template <class Gen, class U>
+inline typename detail::fraction_traits<Gen>::result_type continued_fraction_a(Gen& g, const U& factor, boost::uintmax_t& max_terms)
+{
+ BOOST_MATH_STD_USING // ADL of std names
+
+ typedef detail::fraction_traits<Gen> traits;
+ typedef typename traits::result_type result_type;
+ typedef typename traits::value_type value_type;
+
+ result_type tiny = tools::min_value<result_type>();
+
+ value_type v = g();
+
+ result_type f, C, D, delta, a0;
+ f = traits::b(v);
+ a0 = traits::a(v);
+ if(f == 0)
+ f = tiny;
+ C = f;
+ D = 0;
+
+ boost::uintmax_t counter(max_terms);
+
+ do{
+ v = g();
+ D = traits::b(v) + traits::a(v) * D;
+ if(D == 0)
+ D = tiny;
+ C = traits::b(v) + traits::a(v) / C;
+ if(C == 0)
+ C = tiny;
+ D = 1/D;
+ delta = C*D;
+ f = f * delta;
+ }while((fabs(delta - 1) > factor) && --counter);
+
+ max_terms = max_terms - counter;
+
+ return a0/f;
+}
+
+template <class Gen, class U>
+inline typename detail::fraction_traits<Gen>::result_type continued_fraction_a(Gen& g, const U& factor)
+{
+ boost::uintmax_t max_iter = (std::numeric_limits<boost::uintmax_t>::max)();
+ return continued_fraction_a(g, factor, max_iter);
+}
+
+template <class Gen>
+inline typename detail::fraction_traits<Gen>::result_type continued_fraction_a(Gen& g, int bits)
+{
+ BOOST_MATH_STD_USING // ADL of std names
+
+ typedef detail::fraction_traits<Gen> traits;
+ typedef typename traits::result_type result_type;
+
+ result_type factor = ldexp(1.0f, 1-bits); // 1 / pow(result_type(2), bits);
+ boost::uintmax_t max_iter = (std::numeric_limits<boost::uintmax_t>::max)();
+
+ return continued_fraction_a(g, factor, max_iter);
+}
+
+template <class Gen>
+inline typename detail::fraction_traits<Gen>::result_type continued_fraction_a(Gen& g, int bits, boost::uintmax_t& max_terms)
+{
+ BOOST_MATH_STD_USING // ADL of std names
+
+ typedef detail::fraction_traits<Gen> traits;
+ typedef typename traits::result_type result_type;
+
+ result_type factor = ldexp(1.0f, 1-bits); // 1 / pow(result_type(2), bits);
+ return continued_fraction_a(g, factor, max_terms);
+}
+
+} // namespace tools
+} // namespace math
+} // namespace boost
+
+#endif // BOOST_MATH_TOOLS_FRACTION_INCLUDED
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/precision.hpp b/src/third_party/boost-1.56.0/boost/math/tools/precision.hpp
new file mode 100644
index 00000000000..49e653d6a32
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/precision.hpp
@@ -0,0 +1,382 @@
+// Copyright John Maddock 2005-2006.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_MATH_TOOLS_PRECISION_INCLUDED
+#define BOOST_MATH_TOOLS_PRECISION_INCLUDED
+
+#ifdef _MSC_VER
+#pragma once
+#endif
+
+#include <boost/limits.hpp>
+#include <boost/assert.hpp>
+#include <boost/static_assert.hpp>
+#include <boost/mpl/int.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/math/policies/policy.hpp>
+
+// These two are for LDBL_MAN_DIG:
+#include <limits.h>
+#include <math.h>
+
+namespace boost{ namespace math
+{
+namespace tools
+{
+// If T is not specialized, the functions digits, max_value and min_value,
+// all get synthesised automatically from std::numeric_limits.
+// However, if numeric_limits is not specialised for type RealType,
+// for example with NTL::RR type, then you will get a compiler error
+// when code tries to use these functions, unless you explicitly specialise them.
+
+// For example if the precision of RealType varies at runtime,
+// then numeric_limits support may not be appropriate,
+// see boost/math/tools/ntl.hpp for examples like
+// template <> NTL::RR max_value<NTL::RR> ...
+// See Conceptual Requirements for Real Number Types.
+
+template <class T>
+inline int digits(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(T))
+{
+#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+ BOOST_STATIC_ASSERT( ::std::numeric_limits<T>::is_specialized);
+ BOOST_STATIC_ASSERT( ::std::numeric_limits<T>::radix == 2 || ::std::numeric_limits<T>::radix == 10);
+#else
+ BOOST_ASSERT(::std::numeric_limits<T>::is_specialized);
+ BOOST_ASSERT(::std::numeric_limits<T>::radix == 2 || ::std::numeric_limits<T>::radix == 10);
+#endif
+ return std::numeric_limits<T>::radix == 2
+ ? std::numeric_limits<T>::digits
+ : ((std::numeric_limits<T>::digits + 1) * 1000L) / 301L;
+}
+
+template <class T>
+inline T max_value(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T))
+{
+#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+ BOOST_STATIC_ASSERT( ::std::numeric_limits<T>::is_specialized);
+#else
+ BOOST_ASSERT(::std::numeric_limits<T>::is_specialized);
+#endif
+ return (std::numeric_limits<T>::max)();
+} // Also used as a finite 'infinite' value for - and +infinity, for example:
+// -max_value<double> = -1.79769e+308, max_value<double> = 1.79769e+308.
+
+template <class T>
+inline T min_value(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T))
+{
+#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+ BOOST_STATIC_ASSERT( ::std::numeric_limits<T>::is_specialized);
+#else
+ BOOST_ASSERT(::std::numeric_limits<T>::is_specialized);
+#endif
+ return (std::numeric_limits<T>::min)();
+}
+
+namespace detail{
+//
+// Logarithmic limits come next, note that although
+// we can compute these from the log of the max value
+// that is not in general thread safe (if we cache the value)
+// so it's better to specialise these:
+//
+// For type float first:
+//
+template <class T>
+inline T log_max_value(const mpl::int_<128>& BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(T))
+{
+ return 88.0f;
+}
+
+template <class T>
+inline T log_min_value(const mpl::int_<128>& BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(T))
+{
+ return -87.0f;
+}
+//
+// Now double:
+//
+template <class T>
+inline T log_max_value(const mpl::int_<1024>& BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(T))
+{
+ return 709.0;
+}
+
+template <class T>
+inline T log_min_value(const mpl::int_<1024>& BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(T))
+{
+ return -708.0;
+}
+//
+// 80 and 128-bit long doubles:
+//
+template <class T>
+inline T log_max_value(const mpl::int_<16384>& BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(T))
+{
+ return 11356.0L;
+}
+
+template <class T>
+inline T log_min_value(const mpl::int_<16384>& BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(T))
+{
+ return -11355.0L;
+}
+
+template <class T>
+inline T log_max_value(const mpl::int_<0>& BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(T))
+{
+#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+ BOOST_STATIC_ASSERT( ::std::numeric_limits<T>::is_specialized);
+#else
+ BOOST_ASSERT(::std::numeric_limits<T>::is_specialized);
+#endif
+ BOOST_MATH_STD_USING
+ static const T val = log((std::numeric_limits<T>::max)());
+ return val;
+}
+
+template <class T>
+inline T log_min_value(const mpl::int_<0>& BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(T))
+{
+#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+ BOOST_STATIC_ASSERT( ::std::numeric_limits<T>::is_specialized);
+#else
+ BOOST_ASSERT(::std::numeric_limits<T>::is_specialized);
+#endif
+ BOOST_MATH_STD_USING
+ static const T val = log((std::numeric_limits<T>::min)());
+ return val;
+}
+
+template <class T>
+inline T epsilon(const mpl::true_& BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(T))
+{
+ return std::numeric_limits<T>::epsilon();
+}
+
+#if defined(__GNUC__) && ((LDBL_MANT_DIG == 106) || (__LDBL_MANT_DIG__ == 106))
+template <>
+inline long double epsilon<long double>(const mpl::true_& BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(long double))
+{
+ // numeric_limits on Darwin (and elsewhere) tells lies here:
+ // the issue is that long double on a few platforms is
+ // really a "double double" which has a non-contiguous
+ // mantissa: 53 bits followed by an unspecified number of
+ // zero bits, followed by 53 more bits. Thus the apparent
+ // precision of the type varies depending where it's been.
+ // Set epsilon to the value that a 106 bit fixed mantissa
+ // type would have, as that will give us sensible behaviour everywhere.
+ //
+ // This static assert fails for some unknown reason, so
+ // disabled for now...
+ // BOOST_STATIC_ASSERT(std::numeric_limits<long double>::digits == 106);
+ return 2.4651903288156618919116517665087e-32L;
+}
+#endif
+
+template <class T>
+inline T epsilon(const mpl::false_& BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(T))
+{
+ BOOST_MATH_STD_USING // for ADL of std names
+ static const T eps = ldexp(static_cast<T>(1), 1-policies::digits<T, policies::policy<> >());
+ return eps;
+}
+
+} // namespace detail
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4309)
+#endif
+
+template <class T>
+inline T log_max_value(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T))
+{
+#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+ typedef typename mpl::if_c<
+ (std::numeric_limits<T>::radix == 2) &&
+ (std::numeric_limits<T>::max_exponent == 128
+ || std::numeric_limits<T>::max_exponent == 1024
+ || std::numeric_limits<T>::max_exponent == 16384),
+ mpl::int_<(std::numeric_limits<T>::max_exponent > INT_MAX ? INT_MAX : static_cast<int>(std::numeric_limits<T>::max_exponent))>,
+ mpl::int_<0>
+ >::type tag_type;
+ BOOST_STATIC_ASSERT( ::std::numeric_limits<T>::is_specialized);
+ return detail::log_max_value<T>(tag_type());
+#else
+ BOOST_ASSERT(::std::numeric_limits<T>::is_specialized);
+ BOOST_MATH_STD_USING
+ static const T val = log((std::numeric_limits<T>::max)());
+ return val;
+#endif
+}
+
+template <class T>
+inline T log_min_value(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T))
+{
+#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+ typedef typename mpl::if_c<
+ (std::numeric_limits<T>::radix == 2) &&
+ (std::numeric_limits<T>::max_exponent == 128
+ || std::numeric_limits<T>::max_exponent == 1024
+ || std::numeric_limits<T>::max_exponent == 16384),
+ mpl::int_<(std::numeric_limits<T>::max_exponent > INT_MAX ? INT_MAX : static_cast<int>(std::numeric_limits<T>::max_exponent))>,
+ mpl::int_<0>
+ >::type tag_type;
+
+ BOOST_STATIC_ASSERT( ::std::numeric_limits<T>::is_specialized);
+ return detail::log_min_value<T>(tag_type());
+#else
+ BOOST_ASSERT(::std::numeric_limits<T>::is_specialized);
+ BOOST_MATH_STD_USING
+ static const T val = log((std::numeric_limits<T>::min)());
+ return val;
+#endif
+}
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+template <class T>
+inline T epsilon(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(T))
+{
+#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+ return detail::epsilon<T>(mpl::bool_< ::std::numeric_limits<T>::is_specialized>());
+#else
+ return ::std::numeric_limits<T>::is_specialized ?
+ detail::epsilon<T>(mpl::true_()) :
+ detail::epsilon<T>(mpl::false_());
+#endif
+}
+
+namespace detail{
+
+template <class T>
+inline T root_epsilon_imp(const mpl::int_<24>&)
+{
+ return static_cast<T>(0.00034526698300124390839884978618400831996329879769945L);
+}
+
+template <class T>
+inline T root_epsilon_imp(const T*, const mpl::int_<53>&)
+{
+ return static_cast<T>(0.1490116119384765625e-7L);
+}
+
+template <class T>
+inline T root_epsilon_imp(const T*, const mpl::int_<64>&)
+{
+ return static_cast<T>(0.32927225399135962333569506281281311031656150598474e-9L);
+}
+
+template <class T>
+inline T root_epsilon_imp(const T*, const mpl::int_<113>&)
+{
+ return static_cast<T>(0.1387778780781445675529539585113525390625e-16L);
+}
+
+template <class T, class Tag>
+inline T root_epsilon_imp(const T*, const Tag&)
+{
+ BOOST_MATH_STD_USING
+ static const T r_eps = sqrt(tools::epsilon<T>());
+ return r_eps;
+}
+
+template <class T>
+inline T cbrt_epsilon_imp(const mpl::int_<24>&)
+{
+ return static_cast<T>(0.0049215666011518482998719164346805794944150447839903L);
+}
+
+template <class T>
+inline T cbrt_epsilon_imp(const T*, const mpl::int_<53>&)
+{
+ return static_cast<T>(6.05545445239333906078989272793696693569753008995e-6L);
+}
+
+template <class T>
+inline T cbrt_epsilon_imp(const T*, const mpl::int_<64>&)
+{
+ return static_cast<T>(4.76837158203125e-7L);
+}
+
+template <class T>
+inline T cbrt_epsilon_imp(const T*, const mpl::int_<113>&)
+{
+ return static_cast<T>(5.7749313854154005630396773604745549542403508090496e-12L);
+}
+
+template <class T, class Tag>
+inline T cbrt_epsilon_imp(const T*, const Tag&)
+{
+ BOOST_MATH_STD_USING;
+ static const T cbrt_eps = pow(tools::epsilon<T>(), T(1) / 3);
+ return cbrt_eps;
+}
+
+template <class T>
+inline T forth_root_epsilon_imp(const T*, const mpl::int_<24>&)
+{
+ return static_cast<T>(0.018581361171917516667460937040007436176452688944747L);
+}
+
+template <class T>
+inline T forth_root_epsilon_imp(const T*, const mpl::int_<53>&)
+{
+ return static_cast<T>(0.0001220703125L);
+}
+
+template <class T>
+inline T forth_root_epsilon_imp(const T*, const mpl::int_<64>&)
+{
+ return static_cast<T>(0.18145860519450699870567321328132261891067079047605e-4L);
+}
+
+template <class T>
+inline T forth_root_epsilon_imp(const T*, const mpl::int_<113>&)
+{
+ return static_cast<T>(0.37252902984619140625e-8L);
+}
+
+template <class T, class Tag>
+inline T forth_root_epsilon_imp(const T*, const Tag&)
+{
+ BOOST_MATH_STD_USING
+ static const T r_eps = sqrt(sqrt(tools::epsilon<T>()));
+ return r_eps;
+}
+
+}
+
+template <class T>
+inline T root_epsilon()
+{
+ typedef mpl::int_< (::std::numeric_limits<T>::radix == 2) ? std::numeric_limits<T>::digits : 0> tag_type;
+ return detail::root_epsilon_imp(static_cast<T const*>(0), tag_type());
+}
+
+template <class T>
+inline T cbrt_epsilon()
+{
+ typedef mpl::int_< (::std::numeric_limits<T>::radix == 2) ? std::numeric_limits<T>::digits : 0> tag_type;
+ return detail::cbrt_epsilon_imp(static_cast<T const*>(0), tag_type());
+}
+
+template <class T>
+inline T forth_root_epsilon()
+{
+ typedef mpl::int_< (::std::numeric_limits<T>::radix == 2) ? std::numeric_limits<T>::digits : 0> tag_type;
+ return detail::forth_root_epsilon_imp(static_cast<T const*>(0), tag_type());
+}
+
+} // namespace tools
+} // namespace math
+} // namespace boost
+
+#endif // BOOST_MATH_TOOLS_PRECISION_INCLUDED
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/promotion.hpp b/src/third_party/boost-1.56.0/boost/math/tools/promotion.hpp
new file mode 100644
index 00000000000..b3ad2040779
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/promotion.hpp
@@ -0,0 +1,175 @@
+// boost\math\tools\promotion.hpp
+
+// Copyright John Maddock 2006.
+// Copyright Paul A. Bristow 2006.
+
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt
+// or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// Promote arguments functions to allow math functions to have arguments
+// provided as integer OR real (floating-point, built-in or UDT)
+// (called ArithmeticType in functions that use promotion)
+// that help to reduce the risk of creating multiple instantiations.
+// Allows creation of an inline wrapper that forwards to a foo(RT, RT) function,
+// so you never get to instantiate any mixed foo(RT, IT) functions.
+
+#ifndef BOOST_MATH_PROMOTION_HPP
+#define BOOST_MATH_PROMOTION_HPP
+
+#ifdef _MSC_VER
+#pragma once
+#endif
+
+// Boost type traits:
+#include <boost/math/tools/config.hpp>
+#include <boost/type_traits/is_floating_point.hpp> // for boost::is_floating_point;
+#include <boost/type_traits/is_integral.hpp> // for boost::is_integral
+#include <boost/type_traits/is_convertible.hpp> // for boost::is_convertible
+#include <boost/type_traits/is_same.hpp>// for boost::is_same
+#include <boost/type_traits/remove_cv.hpp>// for boost::remove_cv
+// Boost Template meta programming:
+#include <boost/mpl/if.hpp> // for boost::mpl::if_c.
+#include <boost/mpl/and.hpp> // for boost::mpl::if_c.
+#include <boost/mpl/or.hpp> // for boost::mpl::if_c.
+#include <boost/mpl/not.hpp> // for boost::mpl::if_c.
+
+#ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+#include <boost/static_assert.hpp>
+#endif
+
+namespace boost
+{
+ namespace math
+ {
+ namespace tools
+ {
+ // If either T1 or T2 is an integer type,
+ // pretend it was a double (for the purposes of further analysis).
+ // Then pick the wider of the two floating-point types
+ // as the actual signature to forward to.
+ // For example:
+ // foo(int, short) -> double foo(double, double);
+ // foo(int, float) -> double foo(double, double);
+ // Note: NOT float foo(float, float)
+ // foo(int, double) -> foo(double, double);
+ // foo(double, float) -> double foo(double, double);
+ // foo(double, float) -> double foo(double, double);
+ // foo(any-int-or-float-type, long double) -> foo(long double, long double);
+ // but ONLY float foo(float, float) is unchanged.
+ // So the only way to get an entirely float version is to call foo(1.F, 2.F),
+ // But since most (all?) the math functions convert to double internally,
+ // probably there would not be the hoped-for gain by using float here.
+
+ // This follows the C-compatible conversion rules of pow, etc
+ // where pow(int, float) is converted to pow(double, double).
+
+ template <class T>
+ struct promote_arg
+ { // If T is integral type, then promote to double.
+ typedef typename mpl::if_<is_integral<T>, double, T>::type type;
+ };
+ // These full specialisations reduce mpl::if_ usage and speed up
+ // compilation:
+ template <> struct promote_arg<float> { typedef float type; };
+ template <> struct promote_arg<double>{ typedef double type; };
+ template <> struct promote_arg<long double> { typedef long double type; };
+ template <> struct promote_arg<int> { typedef double type; };
+
+ template <class T1, class T2>
+ struct promote_args_2
+ { // Promote, if necessary, & pick the wider of the two floating-point types.
+ // for both parameter types, if integral promote to double.
+ typedef typename promote_arg<T1>::type T1P; // T1 perhaps promoted.
+ typedef typename promote_arg<T2>::type T2P; // T2 perhaps promoted.
+
+ typedef typename mpl::if_<
+ typename mpl::and_<is_floating_point<T1P>, is_floating_point<T2P> >::type, // both T1P and T2P are floating-point?
+ typename mpl::if_< typename mpl::or_<is_same<long double, T1P>, is_same<long double, T2P> >::type, // either long double?
+ long double, // then result type is long double.
+ typename mpl::if_< typename mpl::or_<is_same<double, T1P>, is_same<double, T2P> >::type, // either double?
+ double, // result type is double.
+ float // else result type is float.
+ >::type
+ >::type,
+ // else one or the other is a user-defined type:
+ typename mpl::if_< typename mpl::and_<mpl::not_<is_floating_point<T2P> >, ::boost::is_convertible<T1P, T2P> >, T2P, T1P>::type>::type type;
+ }; // promote_arg2
+ // These full specialisations reduce mpl::if_ usage and speed up
+ // compilation:
+ template <> struct promote_args_2<float, float> { typedef float type; };
+ template <> struct promote_args_2<double, double>{ typedef double type; };
+ template <> struct promote_args_2<long double, long double> { typedef long double type; };
+ template <> struct promote_args_2<int, int> { typedef double type; };
+ template <> struct promote_args_2<int, float> { typedef double type; };
+ template <> struct promote_args_2<float, int> { typedef double type; };
+ template <> struct promote_args_2<int, double> { typedef double type; };
+ template <> struct promote_args_2<double, int> { typedef double type; };
+ template <> struct promote_args_2<int, long double> { typedef long double type; };
+ template <> struct promote_args_2<long double, int> { typedef long double type; };
+ template <> struct promote_args_2<float, double> { typedef double type; };
+ template <> struct promote_args_2<double, float> { typedef double type; };
+ template <> struct promote_args_2<float, long double> { typedef long double type; };
+ template <> struct promote_args_2<long double, float> { typedef long double type; };
+ template <> struct promote_args_2<double, long double> { typedef long double type; };
+ template <> struct promote_args_2<long double, double> { typedef long double type; };
+
+ template <class T1, class T2=float, class T3=float, class T4=float, class T5=float, class T6=float>
+ struct promote_args
+ {
+ typedef typename promote_args_2<
+ typename remove_cv<T1>::type,
+ typename promote_args_2<
+ typename remove_cv<T2>::type,
+ typename promote_args_2<
+ typename remove_cv<T3>::type,
+ typename promote_args_2<
+ typename remove_cv<T4>::type,
+ typename promote_args_2<
+ typename remove_cv<T5>::type, typename remove_cv<T6>::type
+ >::type
+ >::type
+ >::type
+ >::type
+ >::type type;
+
+#ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+ //
+ // Guard against use of long double if it's not supported:
+ //
+ BOOST_STATIC_ASSERT_MSG((0 == ::boost::is_same<type, long double>::value), "Sorry, but this platform does not have sufficient long double support for the special functions to be reliably implemented.");
+#endif
+ };
+
+ //
+ // This struct is the same as above, but has no static assert on long double usage,
+ // it should be used only on functions that can be implemented for long double
+ // even when std lib support is missing or broken for that type.
+ //
+ template <class T1, class T2=float, class T3=float, class T4=float, class T5=float, class T6=float>
+ struct promote_args_permissive
+ {
+ typedef typename promote_args_2<
+ typename remove_cv<T1>::type,
+ typename promote_args_2<
+ typename remove_cv<T2>::type,
+ typename promote_args_2<
+ typename remove_cv<T3>::type,
+ typename promote_args_2<
+ typename remove_cv<T4>::type,
+ typename promote_args_2<
+ typename remove_cv<T5>::type, typename remove_cv<T6>::type
+ >::type
+ >::type
+ >::type
+ >::type
+ >::type type;
+ };
+
+ } // namespace tools
+ } // namespace math
+} // namespace boost
+
+#endif // BOOST_MATH_PROMOTION_HPP
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/rational.hpp b/src/third_party/boost-1.56.0/boost/math/tools/rational.hpp
new file mode 100644
index 00000000000..accffeaf26f
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/rational.hpp
@@ -0,0 +1,333 @@
+// (C) Copyright John Maddock 2006.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_MATH_TOOLS_RATIONAL_HPP
+#define BOOST_MATH_TOOLS_RATIONAL_HPP
+
+#ifdef _MSC_VER
+#pragma once
+#endif
+
+#include <boost/array.hpp>
+#include <boost/math/tools/config.hpp>
+#include <boost/mpl/int.hpp>
+
+#if BOOST_MATH_POLY_METHOD == 1
+# define BOOST_HEADER() <BOOST_JOIN(boost/math/tools/detail/polynomial_horner1_, BOOST_MATH_MAX_POLY_ORDER).hpp>
+# include BOOST_HEADER()
+# undef BOOST_HEADER
+#elif BOOST_MATH_POLY_METHOD == 2
+# define BOOST_HEADER() <BOOST_JOIN(boost/math/tools/detail/polynomial_horner2_, BOOST_MATH_MAX_POLY_ORDER).hpp>
+# include BOOST_HEADER()
+# undef BOOST_HEADER
+#elif BOOST_MATH_POLY_METHOD == 3
+# define BOOST_HEADER() <BOOST_JOIN(boost/math/tools/detail/polynomial_horner3_, BOOST_MATH_MAX_POLY_ORDER).hpp>
+# include BOOST_HEADER()
+# undef BOOST_HEADER
+#endif
+#if BOOST_MATH_RATIONAL_METHOD == 1
+# define BOOST_HEADER() <BOOST_JOIN(boost/math/tools/detail/rational_horner1_, BOOST_MATH_MAX_POLY_ORDER).hpp>
+# include BOOST_HEADER()
+# undef BOOST_HEADER
+#elif BOOST_MATH_RATIONAL_METHOD == 2
+# define BOOST_HEADER() <BOOST_JOIN(boost/math/tools/detail/rational_horner2_, BOOST_MATH_MAX_POLY_ORDER).hpp>
+# include BOOST_HEADER()
+# undef BOOST_HEADER
+#elif BOOST_MATH_RATIONAL_METHOD == 3
+# define BOOST_HEADER() <BOOST_JOIN(boost/math/tools/detail/rational_horner3_, BOOST_MATH_MAX_POLY_ORDER).hpp>
+# include BOOST_HEADER()
+# undef BOOST_HEADER
+#endif
+
+#if 0
+//
+// This just allows dependency trackers to find the headers
+// used in the above PP-magic.
+//
+#include <boost/math/tools/detail/polynomial_horner1_2.hpp>
+#include <boost/math/tools/detail/polynomial_horner1_3.hpp>
+#include <boost/math/tools/detail/polynomial_horner1_4.hpp>
+#include <boost/math/tools/detail/polynomial_horner1_5.hpp>
+#include <boost/math/tools/detail/polynomial_horner1_6.hpp>
+#include <boost/math/tools/detail/polynomial_horner1_7.hpp>
+#include <boost/math/tools/detail/polynomial_horner1_8.hpp>
+#include <boost/math/tools/detail/polynomial_horner1_9.hpp>
+#include <boost/math/tools/detail/polynomial_horner1_10.hpp>
+#include <boost/math/tools/detail/polynomial_horner1_11.hpp>
+#include <boost/math/tools/detail/polynomial_horner1_12.hpp>
+#include <boost/math/tools/detail/polynomial_horner1_13.hpp>
+#include <boost/math/tools/detail/polynomial_horner1_14.hpp>
+#include <boost/math/tools/detail/polynomial_horner1_15.hpp>
+#include <boost/math/tools/detail/polynomial_horner1_16.hpp>
+#include <boost/math/tools/detail/polynomial_horner1_17.hpp>
+#include <boost/math/tools/detail/polynomial_horner1_18.hpp>
+#include <boost/math/tools/detail/polynomial_horner1_19.hpp>
+#include <boost/math/tools/detail/polynomial_horner1_20.hpp>
+#include <boost/math/tools/detail/polynomial_horner2_2.hpp>
+#include <boost/math/tools/detail/polynomial_horner2_3.hpp>
+#include <boost/math/tools/detail/polynomial_horner2_4.hpp>
+#include <boost/math/tools/detail/polynomial_horner2_5.hpp>
+#include <boost/math/tools/detail/polynomial_horner2_6.hpp>
+#include <boost/math/tools/detail/polynomial_horner2_7.hpp>
+#include <boost/math/tools/detail/polynomial_horner2_8.hpp>
+#include <boost/math/tools/detail/polynomial_horner2_9.hpp>
+#include <boost/math/tools/detail/polynomial_horner2_10.hpp>
+#include <boost/math/tools/detail/polynomial_horner2_11.hpp>
+#include <boost/math/tools/detail/polynomial_horner2_12.hpp>
+#include <boost/math/tools/detail/polynomial_horner2_13.hpp>
+#include <boost/math/tools/detail/polynomial_horner2_14.hpp>
+#include <boost/math/tools/detail/polynomial_horner2_15.hpp>
+#include <boost/math/tools/detail/polynomial_horner2_16.hpp>
+#include <boost/math/tools/detail/polynomial_horner2_17.hpp>
+#include <boost/math/tools/detail/polynomial_horner2_18.hpp>
+#include <boost/math/tools/detail/polynomial_horner2_19.hpp>
+#include <boost/math/tools/detail/polynomial_horner2_20.hpp>
+#include <boost/math/tools/detail/polynomial_horner3_2.hpp>
+#include <boost/math/tools/detail/polynomial_horner3_3.hpp>
+#include <boost/math/tools/detail/polynomial_horner3_4.hpp>
+#include <boost/math/tools/detail/polynomial_horner3_5.hpp>
+#include <boost/math/tools/detail/polynomial_horner3_6.hpp>
+#include <boost/math/tools/detail/polynomial_horner3_7.hpp>
+#include <boost/math/tools/detail/polynomial_horner3_8.hpp>
+#include <boost/math/tools/detail/polynomial_horner3_9.hpp>
+#include <boost/math/tools/detail/polynomial_horner3_10.hpp>
+#include <boost/math/tools/detail/polynomial_horner3_11.hpp>
+#include <boost/math/tools/detail/polynomial_horner3_12.hpp>
+#include <boost/math/tools/detail/polynomial_horner3_13.hpp>
+#include <boost/math/tools/detail/polynomial_horner3_14.hpp>
+#include <boost/math/tools/detail/polynomial_horner3_15.hpp>
+#include <boost/math/tools/detail/polynomial_horner3_16.hpp>
+#include <boost/math/tools/detail/polynomial_horner3_17.hpp>
+#include <boost/math/tools/detail/polynomial_horner3_18.hpp>
+#include <boost/math/tools/detail/polynomial_horner3_19.hpp>
+#include <boost/math/tools/detail/polynomial_horner3_20.hpp>
+#include <boost/math/tools/detail/rational_horner1_2.hpp>
+#include <boost/math/tools/detail/rational_horner1_3.hpp>
+#include <boost/math/tools/detail/rational_horner1_4.hpp>
+#include <boost/math/tools/detail/rational_horner1_5.hpp>
+#include <boost/math/tools/detail/rational_horner1_6.hpp>
+#include <boost/math/tools/detail/rational_horner1_7.hpp>
+#include <boost/math/tools/detail/rational_horner1_8.hpp>
+#include <boost/math/tools/detail/rational_horner1_9.hpp>
+#include <boost/math/tools/detail/rational_horner1_10.hpp>
+#include <boost/math/tools/detail/rational_horner1_11.hpp>
+#include <boost/math/tools/detail/rational_horner1_12.hpp>
+#include <boost/math/tools/detail/rational_horner1_13.hpp>
+#include <boost/math/tools/detail/rational_horner1_14.hpp>
+#include <boost/math/tools/detail/rational_horner1_15.hpp>
+#include <boost/math/tools/detail/rational_horner1_16.hpp>
+#include <boost/math/tools/detail/rational_horner1_17.hpp>
+#include <boost/math/tools/detail/rational_horner1_18.hpp>
+#include <boost/math/tools/detail/rational_horner1_19.hpp>
+#include <boost/math/tools/detail/rational_horner1_20.hpp>
+#include <boost/math/tools/detail/rational_horner2_2.hpp>
+#include <boost/math/tools/detail/rational_horner2_3.hpp>
+#include <boost/math/tools/detail/rational_horner2_4.hpp>
+#include <boost/math/tools/detail/rational_horner2_5.hpp>
+#include <boost/math/tools/detail/rational_horner2_6.hpp>
+#include <boost/math/tools/detail/rational_horner2_7.hpp>
+#include <boost/math/tools/detail/rational_horner2_8.hpp>
+#include <boost/math/tools/detail/rational_horner2_9.hpp>
+#include <boost/math/tools/detail/rational_horner2_10.hpp>
+#include <boost/math/tools/detail/rational_horner2_11.hpp>
+#include <boost/math/tools/detail/rational_horner2_12.hpp>
+#include <boost/math/tools/detail/rational_horner2_13.hpp>
+#include <boost/math/tools/detail/rational_horner2_14.hpp>
+#include <boost/math/tools/detail/rational_horner2_15.hpp>
+#include <boost/math/tools/detail/rational_horner2_16.hpp>
+#include <boost/math/tools/detail/rational_horner2_17.hpp>
+#include <boost/math/tools/detail/rational_horner2_18.hpp>
+#include <boost/math/tools/detail/rational_horner2_19.hpp>
+#include <boost/math/tools/detail/rational_horner2_20.hpp>
+#include <boost/math/tools/detail/rational_horner3_2.hpp>
+#include <boost/math/tools/detail/rational_horner3_3.hpp>
+#include <boost/math/tools/detail/rational_horner3_4.hpp>
+#include <boost/math/tools/detail/rational_horner3_5.hpp>
+#include <boost/math/tools/detail/rational_horner3_6.hpp>
+#include <boost/math/tools/detail/rational_horner3_7.hpp>
+#include <boost/math/tools/detail/rational_horner3_8.hpp>
+#include <boost/math/tools/detail/rational_horner3_9.hpp>
+#include <boost/math/tools/detail/rational_horner3_10.hpp>
+#include <boost/math/tools/detail/rational_horner3_11.hpp>
+#include <boost/math/tools/detail/rational_horner3_12.hpp>
+#include <boost/math/tools/detail/rational_horner3_13.hpp>
+#include <boost/math/tools/detail/rational_horner3_14.hpp>
+#include <boost/math/tools/detail/rational_horner3_15.hpp>
+#include <boost/math/tools/detail/rational_horner3_16.hpp>
+#include <boost/math/tools/detail/rational_horner3_17.hpp>
+#include <boost/math/tools/detail/rational_horner3_18.hpp>
+#include <boost/math/tools/detail/rational_horner3_19.hpp>
+#include <boost/math/tools/detail/rational_horner3_20.hpp>
+#endif
+
+namespace boost{ namespace math{ namespace tools{
+
+//
+// Forward declaration to keep two phase lookup happy:
+//
+template <class T, class U>
+U evaluate_polynomial(const T* poly, U const& z, std::size_t count);
+
+namespace detail{
+
+template <class T, class V, class Tag>
+inline V evaluate_polynomial_c_imp(const T* a, const V& val, const Tag*)
+{
+ return evaluate_polynomial(a, val, Tag::value);
+}
+
+} // namespace detail
+
+//
+// Polynomial evaluation with runtime size.
+// This requires a for-loop which may be more expensive than
+// the loop expanded versions above:
+//
+template <class T, class U>
+inline U evaluate_polynomial(const T* poly, U const& z, std::size_t count)
+{
+ BOOST_ASSERT(count > 0);
+ U sum = static_cast<U>(poly[count - 1]);
+ for(int i = static_cast<int>(count) - 2; i >= 0; --i)
+ {
+ sum *= z;
+ sum += static_cast<U>(poly[i]);
+ }
+ return sum;
+}
+//
+// Compile time sized polynomials, just inline forwarders to the
+// implementations above:
+//
+template <std::size_t N, class T, class V>
+inline V evaluate_polynomial(const T(&a)[N], const V& val)
+{
+ typedef mpl::int_<N> tag_type;
+ return detail::evaluate_polynomial_c_imp(static_cast<const T*>(a), val, static_cast<tag_type const*>(0));
+}
+
+template <std::size_t N, class T, class V>
+inline V evaluate_polynomial(const boost::array<T,N>& a, const V& val)
+{
+ typedef mpl::int_<N> tag_type;
+ return detail::evaluate_polynomial_c_imp(static_cast<const T*>(a.data()), val, static_cast<tag_type const*>(0));
+}
+//
+// Even polynomials are trivial: just square the argument!
+//
+template <class T, class U>
+inline U evaluate_even_polynomial(const T* poly, U z, std::size_t count)
+{
+ return evaluate_polynomial(poly, U(z*z), count);
+}
+
+template <std::size_t N, class T, class V>
+inline V evaluate_even_polynomial(const T(&a)[N], const V& z)
+{
+ return evaluate_polynomial(a, V(z*z));
+}
+
+template <std::size_t N, class T, class V>
+inline V evaluate_even_polynomial(const boost::array<T,N>& a, const V& z)
+{
+ return evaluate_polynomial(a, V(z*z));
+}
+//
+// Odd polynomials come next:
+//
+template <class T, class U>
+inline U evaluate_odd_polynomial(const T* poly, U z, std::size_t count)
+{
+ return poly[0] + z * evaluate_polynomial(poly+1, U(z*z), count-1);
+}
+
+template <std::size_t N, class T, class V>
+inline V evaluate_odd_polynomial(const T(&a)[N], const V& z)
+{
+ typedef mpl::int_<N-1> tag_type;
+ return a[0] + z * detail::evaluate_polynomial_c_imp(static_cast<const T*>(a) + 1, V(z*z), static_cast<tag_type const*>(0));
+}
+
+template <std::size_t N, class T, class V>
+inline V evaluate_odd_polynomial(const boost::array<T,N>& a, const V& z)
+{
+ typedef mpl::int_<N-1> tag_type;
+ return a[0] + z * detail::evaluate_polynomial_c_imp(static_cast<const T*>(a.data()) + 1, V(z*z), static_cast<tag_type const*>(0));
+}
+
+template <class T, class U, class V>
+V evaluate_rational(const T* num, const U* denom, const V& z_, std::size_t count);
+
+namespace detail{
+
+template <class T, class U, class V, class Tag>
+inline V evaluate_rational_c_imp(const T* num, const U* denom, const V& z, const Tag*)
+{
+ return boost::math::tools::evaluate_rational(num, denom, z, Tag::value);
+}
+
+}
+//
+// Rational functions: numerator and denominator must be
+// equal in size. These always have a for-loop and so may be less
+// efficient than evaluating a pair of polynomials. However, there
+// are some tricks we can use to prevent overflow that might otherwise
+// occur in polynomial evaluation, if z is large. This is important
+// in our Lanczos code for example.
+//
+template <class T, class U, class V>
+V evaluate_rational(const T* num, const U* denom, const V& z_, std::size_t count)
+{
+ V z(z_);
+ V s1, s2;
+ if(z <= 1)
+ {
+ s1 = static_cast<V>(num[count-1]);
+ s2 = static_cast<V>(denom[count-1]);
+ for(int i = (int)count - 2; i >= 0; --i)
+ {
+ s1 *= z;
+ s2 *= z;
+ s1 += num[i];
+ s2 += denom[i];
+ }
+ }
+ else
+ {
+ z = 1 / z;
+ s1 = static_cast<V>(num[0]);
+ s2 = static_cast<V>(denom[0]);
+ for(unsigned i = 1; i < count; ++i)
+ {
+ s1 *= z;
+ s2 *= z;
+ s1 += num[i];
+ s2 += denom[i];
+ }
+ }
+ return s1 / s2;
+}
+
+template <std::size_t N, class T, class U, class V>
+inline V evaluate_rational(const T(&a)[N], const U(&b)[N], const V& z)
+{
+ return detail::evaluate_rational_c_imp(a, b, z, static_cast<const mpl::int_<N>*>(0));
+}
+
+template <std::size_t N, class T, class U, class V>
+inline V evaluate_rational(const boost::array<T,N>& a, const boost::array<U,N>& b, const V& z)
+{
+ return detail::evaluate_rational_c_imp(a.data(), b.data(), z, static_cast<mpl::int_<N>*>(0));
+}
+
+} // namespace tools
+} // namespace math
+} // namespace boost
+
+#endif // BOOST_MATH_TOOLS_RATIONAL_HPP
+
+
+
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/real_cast.hpp b/src/third_party/boost-1.56.0/boost/math/tools/real_cast.hpp
new file mode 100644
index 00000000000..9b854e3014c
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/real_cast.hpp
@@ -0,0 +1,29 @@
+// Copyright John Maddock 2006.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_MATH_TOOLS_REAL_CAST_HPP
+#define BOOST_MATH_TOOLS_REAL_CAST_HPP
+
+#ifdef _MSC_VER
+#pragma once
+#endif
+
+namespace boost{ namespace math
+{
+ namespace tools
+ {
+ template <class To, class T>
+ inline To real_cast(T t)
+ {
+ return static_cast<To>(t);
+ }
+ } // namespace tools
+} // namespace math
+} // namespace boost
+
+#endif // BOOST_MATH_TOOLS_REAL_CAST_HPP
+
+
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/roots.hpp b/src/third_party/boost-1.56.0/boost/math/tools/roots.hpp
new file mode 100644
index 00000000000..2442f5c2d1b
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/roots.hpp
@@ -0,0 +1,542 @@
+// (C) Copyright John Maddock 2006.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_MATH_TOOLS_NEWTON_SOLVER_HPP
+#define BOOST_MATH_TOOLS_NEWTON_SOLVER_HPP
+
+#ifdef _MSC_VER
+#pragma once
+#endif
+
+#include <utility>
+#include <boost/config/no_tr1/cmath.hpp>
+#include <stdexcept>
+
+#include <boost/math/tools/config.hpp>
+#include <boost/cstdint.hpp>
+#include <boost/assert.hpp>
+#include <boost/throw_exception.hpp>
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable: 4512)
+#endif
+#include <boost/math/tools/tuple.hpp>
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+#include <boost/math/special_functions/sign.hpp>
+#include <boost/math/tools/toms748_solve.hpp>
+#include <boost/math/policies/error_handling.hpp>
+
+namespace boost{ namespace math{ namespace tools{
+
+namespace detail{
+
+template <class Tuple, class T>
+inline void unpack_0(const Tuple& t, T& val)
+{ val = boost::math::get<0>(t); }
+
+template <class F, class T>
+void handle_zero_derivative(F f,
+ T& last_f0,
+ const T& f0,
+ T& delta,
+ T& result,
+ T& guess,
+ const T& min,
+ const T& max)
+{
+ if(last_f0 == 0)
+ {
+ // this must be the first iteration, pretend that we had a
+ // previous one at either min or max:
+ if(result == min)
+ {
+ guess = max;
+ }
+ else
+ {
+ guess = min;
+ }
+ unpack_0(f(guess), last_f0);
+ delta = guess - result;
+ }
+ if(sign(last_f0) * sign(f0) < 0)
+ {
+ // we've crossed over so move in opposite direction to last step:
+ if(delta < 0)
+ {
+ delta = (result - min) / 2;
+ }
+ else
+ {
+ delta = (result - max) / 2;
+ }
+ }
+ else
+ {
+ // move in same direction as last step:
+ if(delta < 0)
+ {
+ delta = (result - max) / 2;
+ }
+ else
+ {
+ delta = (result - min) / 2;
+ }
+ }
+}
+
+} // namespace
+
+template <class F, class T, class Tol, class Policy>
+std::pair<T, T> bisect(F f, T min, T max, Tol tol, boost::uintmax_t& max_iter, const Policy& pol)
+{
+ T fmin = f(min);
+ T fmax = f(max);
+ if(fmin == 0)
+ return std::make_pair(min, min);
+ if(fmax == 0)
+ return std::make_pair(max, max);
+
+ //
+ // Error checking:
+ //
+ static const char* function = "boost::math::tools::bisect<%1%>";
+ if(min >= max)
+ {
+ return boost::math::detail::pair_from_single(policies::raise_evaluation_error(function,
+ "Arguments in wrong order in boost::math::tools::bisect (first arg=%1%)", min, pol));
+ }
+ if(fmin * fmax >= 0)
+ {
+ return boost::math::detail::pair_from_single(policies::raise_evaluation_error(function,
+ "No change of sign in boost::math::tools::bisect, either there is no root to find, or there are multiple roots in the interval (f(min) = %1%).", fmin, pol));
+ }
+
+ //
+ // Three function invocations so far:
+ //
+ boost::uintmax_t count = max_iter;
+ if(count < 3)
+ count = 0;
+ else
+ count -= 3;
+
+ while(count && (0 == tol(min, max)))
+ {
+ T mid = (min + max) / 2;
+ T fmid = f(mid);
+ if((mid == max) || (mid == min))
+ break;
+ if(fmid == 0)
+ {
+ min = max = mid;
+ break;
+ }
+ else if(sign(fmid) * sign(fmin) < 0)
+ {
+ max = mid;
+ fmax = fmid;
+ }
+ else
+ {
+ min = mid;
+ fmin = fmid;
+ }
+ --count;
+ }
+
+ max_iter -= count;
+
+#ifdef BOOST_MATH_INSTRUMENT
+ std::cout << "Bisection iteration, final count = " << max_iter << std::endl;
+
+ static boost::uintmax_t max_count = 0;
+ if(max_iter > max_count)
+ {
+ max_count = max_iter;
+ std::cout << "Maximum iterations: " << max_iter << std::endl;
+ }
+#endif
+
+ return std::make_pair(min, max);
+}
+
+template <class F, class T, class Tol>
+inline std::pair<T, T> bisect(F f, T min, T max, Tol tol, boost::uintmax_t& max_iter)
+{
+ return bisect(f, min, max, tol, max_iter, policies::policy<>());
+}
+
+template <class F, class T, class Tol>
+inline std::pair<T, T> bisect(F f, T min, T max, Tol tol)
+{
+ boost::uintmax_t m = (std::numeric_limits<boost::uintmax_t>::max)();
+ return bisect(f, min, max, tol, m, policies::policy<>());
+}
+
+template <class F, class T>
+T newton_raphson_iterate(F f, T guess, T min, T max, int digits, boost::uintmax_t& max_iter)
+{
+ BOOST_MATH_STD_USING
+
+ T f0(0), f1, last_f0(0);
+ T result = guess;
+
+ T factor = static_cast<T>(ldexp(1.0, 1 - digits));
+ T delta = 1;
+ T delta1 = tools::max_value<T>();
+ T delta2 = tools::max_value<T>();
+
+ boost::uintmax_t count(max_iter);
+
+ do{
+ last_f0 = f0;
+ delta2 = delta1;
+ delta1 = delta;
+ boost::math::tie(f0, f1) = f(result);
+ if(0 == f0)
+ break;
+ if(f1 == 0)
+ {
+ // Oops zero derivative!!!
+#ifdef BOOST_MATH_INSTRUMENT
+ std::cout << "Newton iteration, zero derivative found" << std::endl;
+#endif
+ detail::handle_zero_derivative(f, last_f0, f0, delta, result, guess, min, max);
+ }
+ else
+ {
+ delta = f0 / f1;
+ }
+#ifdef BOOST_MATH_INSTRUMENT
+ std::cout << "Newton iteration, delta = " << delta << std::endl;
+#endif
+ if(fabs(delta * 2) > fabs(delta2))
+ {
+ // last two steps haven't converged, try bisection:
+ delta = (delta > 0) ? (result - min) / 2 : (result - max) / 2;
+ }
+ guess = result;
+ result -= delta;
+ if(result <= min)
+ {
+ delta = 0.5F * (guess - min);
+ result = guess - delta;
+ if((result == min) || (result == max))
+ break;
+ }
+ else if(result >= max)
+ {
+ delta = 0.5F * (guess - max);
+ result = guess - delta;
+ if((result == min) || (result == max))
+ break;
+ }
+ // update brackets:
+ if(delta > 0)
+ max = guess;
+ else
+ min = guess;
+ }while(--count && (fabs(result * factor) < fabs(delta)));
+
+ max_iter -= count;
+
+#ifdef BOOST_MATH_INSTRUMENT
+ std::cout << "Newton Raphson iteration, final count = " << max_iter << std::endl;
+
+ static boost::uintmax_t max_count = 0;
+ if(max_iter > max_count)
+ {
+ max_count = max_iter;
+ std::cout << "Maximum iterations: " << max_iter << std::endl;
+ }
+#endif
+
+ return result;
+}
+
+template <class F, class T>
+inline T newton_raphson_iterate(F f, T guess, T min, T max, int digits)
+{
+ boost::uintmax_t m = (std::numeric_limits<boost::uintmax_t>::max)();
+ return newton_raphson_iterate(f, guess, min, max, digits, m);
+}
+
+template <class F, class T>
+T halley_iterate(F f, T guess, T min, T max, int digits, boost::uintmax_t& max_iter)
+{
+ BOOST_MATH_STD_USING
+
+ T f0(0), f1, f2;
+ T result = guess;
+
+ T factor = static_cast<T>(ldexp(1.0, 1 - digits));
+ T delta = (std::max)(T(10000000 * guess), T(10000000)); // arbitarily large delta
+ T last_f0 = 0;
+ T delta1 = delta;
+ T delta2 = delta;
+
+ bool out_of_bounds_sentry = false;
+
+#ifdef BOOST_MATH_INSTRUMENT
+ std::cout << "Halley iteration, limit = " << factor << std::endl;
+#endif
+
+ boost::uintmax_t count(max_iter);
+
+ do{
+ last_f0 = f0;
+ delta2 = delta1;
+ delta1 = delta;
+ boost::math::tie(f0, f1, f2) = f(result);
+
+ BOOST_MATH_INSTRUMENT_VARIABLE(f0);
+ BOOST_MATH_INSTRUMENT_VARIABLE(f1);
+ BOOST_MATH_INSTRUMENT_VARIABLE(f2);
+
+ if(0 == f0)
+ break;
+ if(f1 == 0)
+ {
+ // Oops zero derivative!!!
+#ifdef BOOST_MATH_INSTRUMENT
+ std::cout << "Halley iteration, zero derivative found" << std::endl;
+#endif
+ detail::handle_zero_derivative(f, last_f0, f0, delta, result, guess, min, max);
+ }
+ else
+ {
+ if(f2 != 0)
+ {
+ T denom = 2 * f0;
+ T num = 2 * f1 - f0 * (f2 / f1);
+
+ BOOST_MATH_INSTRUMENT_VARIABLE(denom);
+ BOOST_MATH_INSTRUMENT_VARIABLE(num);
+
+ if((fabs(num) < 1) && (fabs(denom) >= fabs(num) * tools::max_value<T>()))
+ {
+ // possible overflow, use Newton step:
+ delta = f0 / f1;
+ }
+ else
+ delta = denom / num;
+ if(delta * f1 / f0 < 0)
+ {
+ // Oh dear, we have a problem as Newton and Halley steps
+ // disagree about which way we should move. Probably
+ // there is cancelation error in the calculation of the
+ // Halley step, or else the derivatives are so small
+ // that their values are basically trash. We will move
+ // in the direction indicated by a Newton step, but
+ // by no more than twice the current guess value, otherwise
+ // we can jump way out of bounds if we're not careful.
+ // See https://svn.boost.org/trac/boost/ticket/8314.
+ delta = f0 / f1;
+ if(fabs(delta) > 2 * fabs(guess))
+ delta = (delta < 0 ? -1 : 1) * 2 * fabs(guess);
+ }
+ }
+ else
+ delta = f0 / f1;
+ }
+#ifdef BOOST_MATH_INSTRUMENT
+ std::cout << "Halley iteration, delta = " << delta << std::endl;
+#endif
+ T convergence = fabs(delta / delta2);
+ if((convergence > 0.8) && (convergence < 2))
+ {
+ // last two steps haven't converged, try bisection:
+ delta = (delta > 0) ? (result - min) / 2 : (result - max) / 2;
+ if(fabs(delta) > result)
+ delta = sign(delta) * result; // protect against huge jumps!
+ // reset delta2 so that this branch will *not* be taken on the
+ // next iteration:
+ delta2 = delta * 3;
+ BOOST_MATH_INSTRUMENT_VARIABLE(delta);
+ }
+ guess = result;
+ result -= delta;
+ BOOST_MATH_INSTRUMENT_VARIABLE(result);
+
+ // check for out of bounds step:
+ if(result < min)
+ {
+ T diff = ((fabs(min) < 1) && (fabs(result) > 1) && (tools::max_value<T>() / fabs(result) < fabs(min))) ? T(1000) : T(result / min);
+ if(fabs(diff) < 1)
+ diff = 1 / diff;
+ if(!out_of_bounds_sentry && (diff > 0) && (diff < 3))
+ {
+ // Only a small out of bounds step, lets assume that the result
+ // is probably approximately at min:
+ delta = 0.99f * (guess - min);
+ result = guess - delta;
+ out_of_bounds_sentry = true; // only take this branch once!
+ }
+ else
+ {
+ delta = (guess - min) / 2;
+ result = guess - delta;
+ if((result == min) || (result == max))
+ break;
+ }
+ }
+ else if(result > max)
+ {
+ T diff = ((fabs(max) < 1) && (fabs(result) > 1) && (tools::max_value<T>() / fabs(result) < fabs(max))) ? T(1000) : T(result / max);
+ if(fabs(diff) < 1)
+ diff = 1 / diff;
+ if(!out_of_bounds_sentry && (diff > 0) && (diff < 3))
+ {
+ // Only a small out of bounds step, lets assume that the result
+ // is probably approximately at min:
+ delta = 0.99f * (guess - max);
+ result = guess - delta;
+ out_of_bounds_sentry = true; // only take this branch once!
+ }
+ else
+ {
+ delta = (guess - max) / 2;
+ result = guess - delta;
+ if((result == min) || (result == max))
+ break;
+ }
+ }
+ // update brackets:
+ if(delta > 0)
+ max = guess;
+ else
+ min = guess;
+ }while(--count && (fabs(result * factor) < fabs(delta)));
+
+ max_iter -= count;
+
+#ifdef BOOST_MATH_INSTRUMENT
+ std::cout << "Halley iteration, final count = " << max_iter << std::endl;
+#endif
+
+ return result;
+}
+
+template <class F, class T>
+inline T halley_iterate(F f, T guess, T min, T max, int digits)
+{
+ boost::uintmax_t m = (std::numeric_limits<boost::uintmax_t>::max)();
+ return halley_iterate(f, guess, min, max, digits, m);
+}
+
+template <class F, class T>
+T schroeder_iterate(F f, T guess, T min, T max, int digits, boost::uintmax_t& max_iter)
+{
+ BOOST_MATH_STD_USING
+
+ T f0(0), f1, f2, last_f0(0);
+ T result = guess;
+
+ T factor = static_cast<T>(ldexp(1.0, 1 - digits));
+ T delta = 0;
+ T delta1 = tools::max_value<T>();
+ T delta2 = tools::max_value<T>();
+
+#ifdef BOOST_MATH_INSTRUMENT
+ std::cout << "Schroeder iteration, limit = " << factor << std::endl;
+#endif
+
+ boost::uintmax_t count(max_iter);
+
+ do{
+ last_f0 = f0;
+ delta2 = delta1;
+ delta1 = delta;
+ boost::math::tie(f0, f1, f2) = f(result);
+ if(0 == f0)
+ break;
+ if((f1 == 0) && (f2 == 0))
+ {
+ // Oops zero derivative!!!
+#ifdef BOOST_MATH_INSTRUMENT
+ std::cout << "Halley iteration, zero derivative found" << std::endl;
+#endif
+ detail::handle_zero_derivative(f, last_f0, f0, delta, result, guess, min, max);
+ }
+ else
+ {
+ T ratio = f0 / f1;
+ if(ratio / result < 0.1)
+ {
+ delta = ratio + (f2 / (2 * f1)) * ratio * ratio;
+ // check second derivative doesn't over compensate:
+ if(delta * ratio < 0)
+ delta = ratio;
+ }
+ else
+ delta = ratio; // fall back to Newton iteration.
+ }
+ if(fabs(delta * 2) > fabs(delta2))
+ {
+ // last two steps haven't converged, try bisection:
+ delta = (delta > 0) ? (result - min) / 2 : (result - max) / 2;
+ }
+ guess = result;
+ result -= delta;
+#ifdef BOOST_MATH_INSTRUMENT
+ std::cout << "Halley iteration, delta = " << delta << std::endl;
+#endif
+ if(result <= min)
+ {
+ delta = 0.5F * (guess - min);
+ result = guess - delta;
+ if((result == min) || (result == max))
+ break;
+ }
+ else if(result >= max)
+ {
+ delta = 0.5F * (guess - max);
+ result = guess - delta;
+ if((result == min) || (result == max))
+ break;
+ }
+ // update brackets:
+ if(delta > 0)
+ max = guess;
+ else
+ min = guess;
+ }while(--count && (fabs(result * factor) < fabs(delta)));
+
+ max_iter -= count;
+
+#ifdef BOOST_MATH_INSTRUMENT
+ std::cout << "Schroeder iteration, final count = " << max_iter << std::endl;
+
+ static boost::uintmax_t max_count = 0;
+ if(max_iter > max_count)
+ {
+ max_count = max_iter;
+ std::cout << "Maximum iterations: " << max_iter << std::endl;
+ }
+#endif
+
+ return result;
+}
+
+template <class F, class T>
+inline T schroeder_iterate(F f, T guess, T min, T max, int digits)
+{
+ boost::uintmax_t m = (std::numeric_limits<boost::uintmax_t>::max)();
+ return schroeder_iterate(f, guess, min, max, digits, m);
+}
+
+} // namespace tools
+} // namespace math
+} // namespace boost
+
+#endif // BOOST_MATH_TOOLS_NEWTON_SOLVER_HPP
+
+
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/series.hpp b/src/third_party/boost-1.56.0/boost/math/tools/series.hpp
new file mode 100644
index 00000000000..a32a33fba10
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/series.hpp
@@ -0,0 +1,158 @@
+// (C) Copyright John Maddock 2005-2006.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_MATH_TOOLS_SERIES_INCLUDED
+#define BOOST_MATH_TOOLS_SERIES_INCLUDED
+
+#ifdef _MSC_VER
+#pragma once
+#endif
+
+#include <boost/config/no_tr1/cmath.hpp>
+#include <boost/cstdint.hpp>
+#include <boost/limits.hpp>
+#include <boost/math/tools/config.hpp>
+
+namespace boost{ namespace math{ namespace tools{
+
+//
+// Simple series summation come first:
+//
+template <class Functor, class U, class V>
+inline typename Functor::result_type sum_series(Functor& func, const U& factor, boost::uintmax_t& max_terms, const V& init_value)
+{
+ BOOST_MATH_STD_USING
+
+ typedef typename Functor::result_type result_type;
+
+ boost::uintmax_t counter = max_terms;
+
+ result_type result = init_value;
+ result_type next_term;
+ do{
+ next_term = func();
+ result += next_term;
+ }
+ while((fabs(factor * result) < fabs(next_term)) && --counter);
+
+ // set max_terms to the actual number of terms of the series evaluated:
+ max_terms = max_terms - counter;
+
+ return result;
+}
+
+template <class Functor, class U>
+inline typename Functor::result_type sum_series(Functor& func, const U& factor, boost::uintmax_t& max_terms)
+{
+ typename Functor::result_type init_value = 0;
+ return sum_series(func, factor, max_terms, init_value);
+}
+
+template <class Functor, class U>
+inline typename Functor::result_type sum_series(Functor& func, int bits, boost::uintmax_t& max_terms, const U& init_value)
+{
+ BOOST_MATH_STD_USING
+ typedef typename Functor::result_type result_type;
+ result_type factor = ldexp(result_type(1), 1 - bits);
+ return sum_series(func, factor, max_terms, init_value);
+}
+
+template <class Functor>
+inline typename Functor::result_type sum_series(Functor& func, int bits)
+{
+ BOOST_MATH_STD_USING
+ typedef typename Functor::result_type result_type;
+ boost::uintmax_t iters = (std::numeric_limits<boost::uintmax_t>::max)();
+ result_type init_val = 0;
+ return sum_series(func, bits, iters, init_val);
+}
+
+template <class Functor>
+inline typename Functor::result_type sum_series(Functor& func, int bits, boost::uintmax_t& max_terms)
+{
+ BOOST_MATH_STD_USING
+ typedef typename Functor::result_type result_type;
+ result_type init_val = 0;
+ return sum_series(func, bits, max_terms, init_val);
+}
+
+template <class Functor, class U>
+inline typename Functor::result_type sum_series(Functor& func, int bits, const U& init_value)
+{
+ BOOST_MATH_STD_USING
+ boost::uintmax_t iters = (std::numeric_limits<boost::uintmax_t>::max)();
+ return sum_series(func, bits, iters, init_value);
+}
+
+//
+// Algorithm kahan_sum_series invokes Functor func until the N'th
+// term is too small to have any effect on the total, the terms
+// are added using the Kahan summation method.
+//
+// CAUTION: Optimizing compilers combined with extended-precision
+// machine registers conspire to render this algorithm partly broken:
+// double rounding of intermediate terms (first to a long double machine
+// register, and then to a double result) cause the rounding error computed
+// by the algorithm to be off by up to 1ulp. However this occurs rarely, and
+// in any case the result is still much better than a naive summation.
+//
+template <class Functor>
+inline typename Functor::result_type kahan_sum_series(Functor& func, int bits)
+{
+ BOOST_MATH_STD_USING
+
+ typedef typename Functor::result_type result_type;
+
+ result_type factor = pow(result_type(2), bits);
+ result_type result = func();
+ result_type next_term, y, t;
+ result_type carry = 0;
+ do{
+ next_term = func();
+ y = next_term - carry;
+ t = result + y;
+ carry = t - result;
+ carry -= y;
+ result = t;
+ }
+ while(fabs(result) < fabs(factor * next_term));
+ return result;
+}
+
+template <class Functor>
+inline typename Functor::result_type kahan_sum_series(Functor& func, int bits, boost::uintmax_t& max_terms)
+{
+ BOOST_MATH_STD_USING
+
+ typedef typename Functor::result_type result_type;
+
+ boost::uintmax_t counter = max_terms;
+
+ result_type factor = ldexp(result_type(1), bits);
+ result_type result = func();
+ result_type next_term, y, t;
+ result_type carry = 0;
+ do{
+ next_term = func();
+ y = next_term - carry;
+ t = result + y;
+ carry = t - result;
+ carry -= y;
+ result = t;
+ }
+ while((fabs(result) < fabs(factor * next_term)) && --counter);
+
+ // set max_terms to the actual number of terms of the series evaluated:
+ max_terms = max_terms - counter;
+
+ return result;
+}
+
+} // namespace tools
+} // namespace math
+} // namespace boost
+
+#endif // BOOST_MATH_TOOLS_SERIES_INCLUDED
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/toms748_solve.hpp b/src/third_party/boost-1.56.0/boost/math/tools/toms748_solve.hpp
new file mode 100644
index 00000000000..9b5ec997e32
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/toms748_solve.hpp
@@ -0,0 +1,585 @@
+// (C) Copyright John Maddock 2006.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_MATH_TOOLS_SOLVE_ROOT_HPP
+#define BOOST_MATH_TOOLS_SOLVE_ROOT_HPP
+
+#ifdef _MSC_VER
+#pragma once
+#endif
+
+#include <boost/math/tools/precision.hpp>
+#include <boost/math/policies/error_handling.hpp>
+#include <boost/math/tools/config.hpp>
+#include <boost/math/special_functions/sign.hpp>
+#include <boost/cstdint.hpp>
+#include <limits>
+
+namespace boost{ namespace math{ namespace tools{
+
+template <class T>
+class eps_tolerance
+{
+public:
+ eps_tolerance(unsigned bits)
+ {
+ BOOST_MATH_STD_USING
+ eps = (std::max)(T(ldexp(1.0F, 1-bits)), T(4 * tools::epsilon<T>()));
+ }
+ bool operator()(const T& a, const T& b)
+ {
+ BOOST_MATH_STD_USING
+ return fabs(a - b) <= (eps * (std::min)(fabs(a), fabs(b)));
+ }
+private:
+ T eps;
+};
+
+struct equal_floor
+{
+ equal_floor(){}
+ template <class T>
+ bool operator()(const T& a, const T& b)
+ {
+ BOOST_MATH_STD_USING
+ return floor(a) == floor(b);
+ }
+};
+
+struct equal_ceil
+{
+ equal_ceil(){}
+ template <class T>
+ bool operator()(const T& a, const T& b)
+ {
+ BOOST_MATH_STD_USING
+ return ceil(a) == ceil(b);
+ }
+};
+
+struct equal_nearest_integer
+{
+ equal_nearest_integer(){}
+ template <class T>
+ bool operator()(const T& a, const T& b)
+ {
+ BOOST_MATH_STD_USING
+ return floor(a + 0.5f) == floor(b + 0.5f);
+ }
+};
+
+namespace detail{
+
+template <class F, class T>
+void bracket(F f, T& a, T& b, T c, T& fa, T& fb, T& d, T& fd)
+{
+ //
+ // Given a point c inside the existing enclosing interval
+ // [a, b] sets a = c if f(c) == 0, otherwise finds the new
+ // enclosing interval: either [a, c] or [c, b] and sets
+ // d and fd to the point that has just been removed from
+ // the interval. In other words d is the third best guess
+ // to the root.
+ //
+ BOOST_MATH_STD_USING // For ADL of std math functions
+ T tol = tools::epsilon<T>() * 2;
+ //
+ // If the interval [a,b] is very small, or if c is too close
+ // to one end of the interval then we need to adjust the
+ // location of c accordingly:
+ //
+ if((b - a) < 2 * tol * a)
+ {
+ c = a + (b - a) / 2;
+ }
+ else if(c <= a + fabs(a) * tol)
+ {
+ c = a + fabs(a) * tol;
+ }
+ else if(c >= b - fabs(b) * tol)
+ {
+ c = b - fabs(a) * tol;
+ }
+ //
+ // OK, lets invoke f(c):
+ //
+ T fc = f(c);
+ //
+ // if we have a zero then we have an exact solution to the root:
+ //
+ if(fc == 0)
+ {
+ a = c;
+ fa = 0;
+ d = 0;
+ fd = 0;
+ return;
+ }
+ //
+ // Non-zero fc, update the interval:
+ //
+ if(boost::math::sign(fa) * boost::math::sign(fc) < 0)
+ {
+ d = b;
+ fd = fb;
+ b = c;
+ fb = fc;
+ }
+ else
+ {
+ d = a;
+ fd = fa;
+ a = c;
+ fa= fc;
+ }
+}
+
+template <class T>
+inline T safe_div(T num, T denom, T r)
+{
+ //
+ // return num / denom without overflow,
+ // return r if overflow would occur.
+ //
+ BOOST_MATH_STD_USING // For ADL of std math functions
+
+ if(fabs(denom) < 1)
+ {
+ if(fabs(denom * tools::max_value<T>()) <= fabs(num))
+ return r;
+ }
+ return num / denom;
+}
+
+template <class T>
+inline T secant_interpolate(const T& a, const T& b, const T& fa, const T& fb)
+{
+ //
+ // Performs standard secant interpolation of [a,b] given
+ // function evaluations f(a) and f(b). Performs a bisection
+ // if secant interpolation would leave us very close to either
+ // a or b. Rationale: we only call this function when at least
+ // one other form of interpolation has already failed, so we know
+ // that the function is unlikely to be smooth with a root very
+ // close to a or b.
+ //
+ BOOST_MATH_STD_USING // For ADL of std math functions
+
+ T tol = tools::epsilon<T>() * 5;
+ T c = a - (fa / (fb - fa)) * (b - a);
+ if((c <= a + fabs(a) * tol) || (c >= b - fabs(b) * tol))
+ return (a + b) / 2;
+ return c;
+}
+
+template <class T>
+T quadratic_interpolate(const T& a, const T& b, T const& d,
+ const T& fa, const T& fb, T const& fd,
+ unsigned count)
+{
+ //
+ // Performs quadratic interpolation to determine the next point,
+ // takes count Newton steps to find the location of the
+ // quadratic polynomial.
+ //
+ // Point d must lie outside of the interval [a,b], it is the third
+ // best approximation to the root, after a and b.
+ //
+ // Note: this does not guarentee to find a root
+ // inside [a, b], so we fall back to a secant step should
+ // the result be out of range.
+ //
+ // Start by obtaining the coefficients of the quadratic polynomial:
+ //
+ T B = safe_div(T(fb - fa), T(b - a), tools::max_value<T>());
+ T A = safe_div(T(fd - fb), T(d - b), tools::max_value<T>());
+ A = safe_div(T(A - B), T(d - a), T(0));
+
+ if(A == 0)
+ {
+ // failure to determine coefficients, try a secant step:
+ return secant_interpolate(a, b, fa, fb);
+ }
+ //
+ // Determine the starting point of the Newton steps:
+ //
+ T c;
+ if(boost::math::sign(A) * boost::math::sign(fa) > 0)
+ {
+ c = a;
+ }
+ else
+ {
+ c = b;
+ }
+ //
+ // Take the Newton steps:
+ //
+ for(unsigned i = 1; i <= count; ++i)
+ {
+ //c -= safe_div(B * c, (B + A * (2 * c - a - b)), 1 + c - a);
+ c -= safe_div(T(fa+(B+A*(c-b))*(c-a)), T(B + A * (2 * c - a - b)), T(1 + c - a));
+ }
+ if((c <= a) || (c >= b))
+ {
+ // Oops, failure, try a secant step:
+ c = secant_interpolate(a, b, fa, fb);
+ }
+ return c;
+}
+
+template <class T>
+T cubic_interpolate(const T& a, const T& b, const T& d,
+ const T& e, const T& fa, const T& fb,
+ const T& fd, const T& fe)
+{
+ //
+ // Uses inverse cubic interpolation of f(x) at points
+ // [a,b,d,e] to obtain an approximate root of f(x).
+ // Points d and e lie outside the interval [a,b]
+ // and are the third and forth best approximations
+ // to the root that we have found so far.
+ //
+ // Note: this does not guarentee to find a root
+ // inside [a, b], so we fall back to quadratic
+ // interpolation in case of an erroneous result.
+ //
+ BOOST_MATH_INSTRUMENT_CODE(" a = " << a << " b = " << b
+ << " d = " << d << " e = " << e << " fa = " << fa << " fb = " << fb
+ << " fd = " << fd << " fe = " << fe);
+ T q11 = (d - e) * fd / (fe - fd);
+ T q21 = (b - d) * fb / (fd - fb);
+ T q31 = (a - b) * fa / (fb - fa);
+ T d21 = (b - d) * fd / (fd - fb);
+ T d31 = (a - b) * fb / (fb - fa);
+ BOOST_MATH_INSTRUMENT_CODE(
+ "q11 = " << q11 << " q21 = " << q21 << " q31 = " << q31
+ << " d21 = " << d21 << " d31 = " << d31);
+ T q22 = (d21 - q11) * fb / (fe - fb);
+ T q32 = (d31 - q21) * fa / (fd - fa);
+ T d32 = (d31 - q21) * fd / (fd - fa);
+ T q33 = (d32 - q22) * fa / (fe - fa);
+ T c = q31 + q32 + q33 + a;
+ BOOST_MATH_INSTRUMENT_CODE(
+ "q22 = " << q22 << " q32 = " << q32 << " d32 = " << d32
+ << " q33 = " << q33 << " c = " << c);
+
+ if((c <= a) || (c >= b))
+ {
+ // Out of bounds step, fall back to quadratic interpolation:
+ c = quadratic_interpolate(a, b, d, fa, fb, fd, 3);
+ BOOST_MATH_INSTRUMENT_CODE(
+ "Out of bounds interpolation, falling back to quadratic interpolation. c = " << c);
+ }
+
+ return c;
+}
+
+} // namespace detail
+
+template <class F, class T, class Tol, class Policy>
+std::pair<T, T> toms748_solve(F f, const T& ax, const T& bx, const T& fax, const T& fbx, Tol tol, boost::uintmax_t& max_iter, const Policy& pol)
+{
+ //
+ // Main entry point and logic for Toms Algorithm 748
+ // root finder.
+ //
+ BOOST_MATH_STD_USING // For ADL of std math functions
+
+ static const char* function = "boost::math::tools::toms748_solve<%1%>";
+
+ boost::uintmax_t count = max_iter;
+ T a, b, fa, fb, c, u, fu, a0, b0, d, fd, e, fe;
+ static const T mu = 0.5f;
+
+ // initialise a, b and fa, fb:
+ a = ax;
+ b = bx;
+ if(a >= b)
+ return boost::math::detail::pair_from_single(policies::raise_domain_error(
+ function,
+ "Parameters a and b out of order: a=%1%", a, pol));
+ fa = fax;
+ fb = fbx;
+
+ if(tol(a, b) || (fa == 0) || (fb == 0))
+ {
+ max_iter = 0;
+ if(fa == 0)
+ b = a;
+ else if(fb == 0)
+ a = b;
+ return std::make_pair(a, b);
+ }
+
+ if(boost::math::sign(fa) * boost::math::sign(fb) > 0)
+ return boost::math::detail::pair_from_single(policies::raise_domain_error(
+ function,
+ "Parameters a and b do not bracket the root: a=%1%", a, pol));
+ // dummy value for fd, e and fe:
+ fe = e = fd = 1e5F;
+
+ if(fa != 0)
+ {
+ //
+ // On the first step we take a secant step:
+ //
+ c = detail::secant_interpolate(a, b, fa, fb);
+ detail::bracket(f, a, b, c, fa, fb, d, fd);
+ --count;
+ BOOST_MATH_INSTRUMENT_CODE(" a = " << a << " b = " << b);
+
+ if(count && (fa != 0) && !tol(a, b))
+ {
+ //
+ // On the second step we take a quadratic interpolation:
+ //
+ c = detail::quadratic_interpolate(a, b, d, fa, fb, fd, 2);
+ e = d;
+ fe = fd;
+ detail::bracket(f, a, b, c, fa, fb, d, fd);
+ --count;
+ BOOST_MATH_INSTRUMENT_CODE(" a = " << a << " b = " << b);
+ }
+ }
+
+ while(count && (fa != 0) && !tol(a, b))
+ {
+ // save our brackets:
+ a0 = a;
+ b0 = b;
+ //
+ // Starting with the third step taken
+ // we can use either quadratic or cubic interpolation.
+ // Cubic interpolation requires that all four function values
+ // fa, fb, fd, and fe are distinct, should that not be the case
+ // then variable prof will get set to true, and we'll end up
+ // taking a quadratic step instead.
+ //
+ T min_diff = tools::min_value<T>() * 32;
+ bool prof = (fabs(fa - fb) < min_diff) || (fabs(fa - fd) < min_diff) || (fabs(fa - fe) < min_diff) || (fabs(fb - fd) < min_diff) || (fabs(fb - fe) < min_diff) || (fabs(fd - fe) < min_diff);
+ if(prof)
+ {
+ c = detail::quadratic_interpolate(a, b, d, fa, fb, fd, 2);
+ BOOST_MATH_INSTRUMENT_CODE("Can't take cubic step!!!!");
+ }
+ else
+ {
+ c = detail::cubic_interpolate(a, b, d, e, fa, fb, fd, fe);
+ }
+ //
+ // re-bracket, and check for termination:
+ //
+ e = d;
+ fe = fd;
+ detail::bracket(f, a, b, c, fa, fb, d, fd);
+ if((0 == --count) || (fa == 0) || tol(a, b))
+ break;
+ BOOST_MATH_INSTRUMENT_CODE(" a = " << a << " b = " << b);
+ //
+ // Now another interpolated step:
+ //
+ prof = (fabs(fa - fb) < min_diff) || (fabs(fa - fd) < min_diff) || (fabs(fa - fe) < min_diff) || (fabs(fb - fd) < min_diff) || (fabs(fb - fe) < min_diff) || (fabs(fd - fe) < min_diff);
+ if(prof)
+ {
+ c = detail::quadratic_interpolate(a, b, d, fa, fb, fd, 3);
+ BOOST_MATH_INSTRUMENT_CODE("Can't take cubic step!!!!");
+ }
+ else
+ {
+ c = detail::cubic_interpolate(a, b, d, e, fa, fb, fd, fe);
+ }
+ //
+ // Bracket again, and check termination condition, update e:
+ //
+ detail::bracket(f, a, b, c, fa, fb, d, fd);
+ if((0 == --count) || (fa == 0) || tol(a, b))
+ break;
+ BOOST_MATH_INSTRUMENT_CODE(" a = " << a << " b = " << b);
+ //
+ // Now we take a double-length secant step:
+ //
+ if(fabs(fa) < fabs(fb))
+ {
+ u = a;
+ fu = fa;
+ }
+ else
+ {
+ u = b;
+ fu = fb;
+ }
+ c = u - 2 * (fu / (fb - fa)) * (b - a);
+ if(fabs(c - u) > (b - a) / 2)
+ {
+ c = a + (b - a) / 2;
+ }
+ //
+ // Bracket again, and check termination condition:
+ //
+ e = d;
+ fe = fd;
+ detail::bracket(f, a, b, c, fa, fb, d, fd);
+ BOOST_MATH_INSTRUMENT_CODE(" a = " << a << " b = " << b);
+ BOOST_MATH_INSTRUMENT_CODE(" tol = " << T((fabs(a) - fabs(b)) / fabs(a)));
+ if((0 == --count) || (fa == 0) || tol(a, b))
+ break;
+ //
+ // And finally... check to see if an additional bisection step is
+ // to be taken, we do this if we're not converging fast enough:
+ //
+ if((b - a) < mu * (b0 - a0))
+ continue;
+ //
+ // bracket again on a bisection:
+ //
+ e = d;
+ fe = fd;
+ detail::bracket(f, a, b, T(a + (b - a) / 2), fa, fb, d, fd);
+ --count;
+ BOOST_MATH_INSTRUMENT_CODE("Not converging: Taking a bisection!!!!");
+ BOOST_MATH_INSTRUMENT_CODE(" a = " << a << " b = " << b);
+ } // while loop
+
+ max_iter -= count;
+ if(fa == 0)
+ {
+ b = a;
+ }
+ else if(fb == 0)
+ {
+ a = b;
+ }
+ return std::make_pair(a, b);
+}
+
+template <class F, class T, class Tol>
+inline std::pair<T, T> toms748_solve(F f, const T& ax, const T& bx, const T& fax, const T& fbx, Tol tol, boost::uintmax_t& max_iter)
+{
+ return toms748_solve(f, ax, bx, fax, fbx, tol, max_iter, policies::policy<>());
+}
+
+template <class F, class T, class Tol, class Policy>
+inline std::pair<T, T> toms748_solve(F f, const T& ax, const T& bx, Tol tol, boost::uintmax_t& max_iter, const Policy& pol)
+{
+ max_iter -= 2;
+ std::pair<T, T> r = toms748_solve(f, ax, bx, f(ax), f(bx), tol, max_iter, pol);
+ max_iter += 2;
+ return r;
+}
+
+template <class F, class T, class Tol>
+inline std::pair<T, T> toms748_solve(F f, const T& ax, const T& bx, Tol tol, boost::uintmax_t& max_iter)
+{
+ return toms748_solve(f, ax, bx, tol, max_iter, policies::policy<>());
+}
+
+template <class F, class T, class Tol, class Policy>
+std::pair<T, T> bracket_and_solve_root(F f, const T& guess, T factor, bool rising, Tol tol, boost::uintmax_t& max_iter, const Policy& pol)
+{
+ BOOST_MATH_STD_USING
+ static const char* function = "boost::math::tools::bracket_and_solve_root<%1%>";
+ //
+ // Set up inital brackets:
+ //
+ T a = guess;
+ T b = a;
+ T fa = f(a);
+ T fb = fa;
+ //
+ // Set up invocation count:
+ //
+ boost::uintmax_t count = max_iter - 1;
+
+ if((fa < 0) == (guess < 0 ? !rising : rising))
+ {
+ //
+ // Zero is to the right of b, so walk upwards
+ // until we find it:
+ //
+ while((boost::math::sign)(fb) == (boost::math::sign)(fa))
+ {
+ if(count == 0)
+ return boost::math::detail::pair_from_single(policies::raise_evaluation_error(function, "Unable to bracket root, last nearest value was %1%", b, pol));
+ //
+ // Heuristic: every 20 iterations we double the growth factor in case the
+ // initial guess was *really* bad !
+ //
+ if((max_iter - count) % 20 == 0)
+ factor *= 2;
+ //
+ // Now go ahead and move our guess by "factor":
+ //
+ a = b;
+ fa = fb;
+ b *= factor;
+ fb = f(b);
+ --count;
+ BOOST_MATH_INSTRUMENT_CODE("a = " << a << " b = " << b << " fa = " << fa << " fb = " << fb << " count = " << count);
+ }
+ }
+ else
+ {
+ //
+ // Zero is to the left of a, so walk downwards
+ // until we find it:
+ //
+ while((boost::math::sign)(fb) == (boost::math::sign)(fa))
+ {
+ if(fabs(a) < tools::min_value<T>())
+ {
+ // Escape route just in case the answer is zero!
+ max_iter -= count;
+ max_iter += 1;
+ return a > 0 ? std::make_pair(T(0), T(a)) : std::make_pair(T(a), T(0));
+ }
+ if(count == 0)
+ return boost::math::detail::pair_from_single(policies::raise_evaluation_error(function, "Unable to bracket root, last nearest value was %1%", a, pol));
+ //
+ // Heuristic: every 20 iterations we double the growth factor in case the
+ // initial guess was *really* bad !
+ //
+ if((max_iter - count) % 20 == 0)
+ factor *= 2;
+ //
+ // Now go ahead and move are guess by "factor":
+ //
+ b = a;
+ fb = fa;
+ a /= factor;
+ fa = f(a);
+ --count;
+ BOOST_MATH_INSTRUMENT_CODE("a = " << a << " b = " << b << " fa = " << fa << " fb = " << fb << " count = " << count);
+ }
+ }
+ max_iter -= count;
+ max_iter += 1;
+ std::pair<T, T> r = toms748_solve(
+ f,
+ (a < 0 ? b : a),
+ (a < 0 ? a : b),
+ (a < 0 ? fb : fa),
+ (a < 0 ? fa : fb),
+ tol,
+ count,
+ pol);
+ max_iter += count;
+ BOOST_MATH_INSTRUMENT_CODE("max_iter = " << max_iter << " count = " << count);
+ return r;
+}
+
+template <class F, class T, class Tol>
+inline std::pair<T, T> bracket_and_solve_root(F f, const T& guess, const T& factor, bool rising, Tol tol, boost::uintmax_t& max_iter)
+{
+ return bracket_and_solve_root(f, guess, factor, rising, tol, max_iter, policies::policy<>());
+}
+
+} // namespace tools
+} // namespace math
+} // namespace boost
+
+
+#endif // BOOST_MATH_TOOLS_SOLVE_ROOT_HPP
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/tuple.hpp b/src/third_party/boost-1.56.0/boost/math/tools/tuple.hpp
new file mode 100644
index 00000000000..0ae778cbef5
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/tuple.hpp
@@ -0,0 +1,90 @@
+// (C) Copyright John Maddock 2010.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_MATH_TUPLE_HPP_INCLUDED
+# define BOOST_MATH_TUPLE_HPP_INCLUDED
+# include <boost/config.hpp>
+
+#ifndef BOOST_NO_CXX11_HDR_TUPLE
+
+#include <tuple>
+
+namespace boost{ namespace math{
+
+using ::std::tuple;
+
+// [6.1.3.2] Tuple creation functions
+using ::std::ignore;
+using ::std::make_tuple;
+using ::std::tie;
+using ::std::get;
+
+// [6.1.3.3] Tuple helper classes
+using ::std::tuple_size;
+using ::std::tuple_element;
+
+}}
+
+#elif (defined(__BORLANDC__) && (__BORLANDC__ <= 0x600)) || defined(__IBMCPP__)
+
+#include <boost/tuple/tuple.hpp>
+#include <boost/tuple/tuple_comparison.hpp>
+#include <boost/type_traits/integral_constant.hpp>
+
+namespace boost{ namespace math{
+
+using ::boost::tuple;
+
+// [6.1.3.2] Tuple creation functions
+using ::boost::tuples::ignore;
+using ::boost::make_tuple;
+using ::boost::tie;
+
+// [6.1.3.3] Tuple helper classes
+template <class T>
+struct tuple_size
+ : public ::boost::integral_constant
+ < ::std::size_t, ::boost::tuples::length<T>::value>
+{};
+
+template < int I, class T>
+struct tuple_element
+{
+ typedef typename boost::tuples::element<I,T>::type type;
+};
+
+#if !BOOST_WORKAROUND(__BORLANDC__, < 0x0582)
+// [6.1.3.4] Element access
+using ::boost::get;
+#endif
+
+} } // namespaces
+
+#else
+
+#include <boost/fusion/include/tuple.hpp>
+#include <boost/fusion/include/std_pair.hpp>
+
+namespace boost{ namespace math{
+
+using ::boost::fusion::tuple;
+
+// [6.1.3.2] Tuple creation functions
+using ::boost::fusion::ignore;
+using ::boost::fusion::make_tuple;
+using ::boost::fusion::tie;
+using ::boost::fusion::get;
+
+// [6.1.3.3] Tuple helper classes
+using ::boost::fusion::tuple_size;
+using ::boost::fusion::tuple_element;
+
+}}
+
+#endif
+
+#endif
+
+
diff --git a/src/third_party/boost-1.56.0/boost/math/tools/user.hpp b/src/third_party/boost-1.56.0/boost/math/tools/user.hpp
new file mode 100644
index 00000000000..08a7e53d9eb
--- /dev/null
+++ b/src/third_party/boost-1.56.0/boost/math/tools/user.hpp
@@ -0,0 +1,105 @@
+// Copyright John Maddock 2007.
+// Copyright Paul A. Bristow 2007.
+
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt
+// or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_MATH_TOOLS_USER_HPP
+#define BOOST_MATH_TOOLS_USER_HPP
+
+#ifdef _MSC_VER
+#pragma once
+#endif
+
+// This file can be modified by the user to change the default policies.
+// See "Changing the Policy Defaults" in documentation.
+
+// define this if the platform has no long double functions,
+// or if the long double versions have only double precision:
+//
+// #define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+//
+// Performance tuning options:
+//
+// #define BOOST_MATH_POLY_METHOD 3
+// #define BOOST_MATH_RATIONAL_METHOD 3
+//
+// The maximum order of polynomial that will be evaluated
+// via an unrolled specialisation:
+//
+// #define BOOST_MATH_MAX_POLY_ORDER 17
+//
+// decide whether to store constants as integers or reals:
+//
+// #define BOOST_MATH_INT_TABLE_TYPE(RT, IT) IT
+
+//
+// Default policies follow:
+//
+// Domain errors:
+//
+// #define BOOST_MATH_DOMAIN_ERROR_POLICY throw_on_error
+//
+// Pole errors:
+//
+// #define BOOST_MATH_POLE_ERROR_POLICY throw_on_error
+//
+// Overflow Errors:
+//
+// #define BOOST_MATH_OVERFLOW_ERROR_POLICY throw_on_error
+//
+// Internal Evaluation Errors:
+//
+// #define BOOST_MATH_EVALUATION_ERROR_POLICY throw_on_error
+//
+// Underfow:
+//
+// #define BOOST_MATH_UNDERFLOW_ERROR_POLICY ignore_error
+//
+// Denorms:
+//
+// #define BOOST_MATH_DENORM_ERROR_POLICY ignore_error
+//
+// Max digits to use for internal calculations:
+//
+// #define BOOST_MATH_DIGITS10_POLICY 0
+//
+// Promote floats to doubles internally?
+//
+// #define BOOST_MATH_PROMOTE_FLOAT_POLICY true
+//
+// Promote doubles to long double internally:
+//
+// #define BOOST_MATH_PROMOTE_DOUBLE_POLICY true
+//
+// What do discrete quantiles return?
+//
+// #define BOOST_MATH_DISCRETE_QUANTILE_POLICY integer_round_outwards
+//
+// If a function is mathematically undefined
+// (for example the Cauchy distribution has no mean),
+// then do we stop the code from compiling?
+//
+// #define BOOST_MATH_ASSERT_UNDEFINED_POLICY true
+//
+// Maximum series iterstions permitted:
+//
+// #define BOOST_MATH_MAX_SERIES_ITERATION_POLICY 1000000
+//
+// Maximum root finding steps permitted:
+//
+// define BOOST_MATH_MAX_ROOT_ITERATION_POLICY 200
+//
+// Enable use of __float128 in numeric constants:
+//
+// #define BOOST_MATH_USE_FLOAT128
+//
+// Disable use of __float128 in numeric_constants even if the compiler looks to support it:
+//
+// #define BOOST_MATH_DISABLE_FLOAT128
+
+#endif // BOOST_MATH_TOOLS_USER_HPP
+
+