Added boost header
This commit is contained in:
84
test/external/boost/math/tools/detail/polynomial_horner1_10.hpp
vendored
Normal file
84
test/external/boost/math/tools/detail/polynomial_horner1_10.hpp
vendored
Normal file
@@ -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* a, 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
|
||||
|
||||
90
test/external/boost/math/tools/detail/polynomial_horner1_11.hpp
vendored
Normal file
90
test/external/boost/math/tools/detail/polynomial_horner1_11.hpp
vendored
Normal file
@@ -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* a, 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
|
||||
|
||||
96
test/external/boost/math/tools/detail/polynomial_horner1_12.hpp
vendored
Normal file
96
test/external/boost/math/tools/detail/polynomial_horner1_12.hpp
vendored
Normal file
@@ -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* a, 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
|
||||
|
||||
102
test/external/boost/math/tools/detail/polynomial_horner1_13.hpp
vendored
Normal file
102
test/external/boost/math/tools/detail/polynomial_horner1_13.hpp
vendored
Normal file
@@ -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* a, 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
|
||||
|
||||
108
test/external/boost/math/tools/detail/polynomial_horner1_14.hpp
vendored
Normal file
108
test/external/boost/math/tools/detail/polynomial_horner1_14.hpp
vendored
Normal file
@@ -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* a, 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
|
||||
|
||||
114
test/external/boost/math/tools/detail/polynomial_horner1_15.hpp
vendored
Normal file
114
test/external/boost/math/tools/detail/polynomial_horner1_15.hpp
vendored
Normal file
@@ -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* a, 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
|
||||
|
||||
120
test/external/boost/math/tools/detail/polynomial_horner1_16.hpp
vendored
Normal file
120
test/external/boost/math/tools/detail/polynomial_horner1_16.hpp
vendored
Normal file
@@ -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* a, 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
|
||||
|
||||
126
test/external/boost/math/tools/detail/polynomial_horner1_17.hpp
vendored
Normal file
126
test/external/boost/math/tools/detail/polynomial_horner1_17.hpp
vendored
Normal file
@@ -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* a, 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
|
||||
|
||||
132
test/external/boost/math/tools/detail/polynomial_horner1_18.hpp
vendored
Normal file
132
test/external/boost/math/tools/detail/polynomial_horner1_18.hpp
vendored
Normal file
@@ -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* a, 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
|
||||
|
||||
138
test/external/boost/math/tools/detail/polynomial_horner1_19.hpp
vendored
Normal file
138
test/external/boost/math/tools/detail/polynomial_horner1_19.hpp
vendored
Normal file
@@ -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* a, 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
|
||||
|
||||
36
test/external/boost/math/tools/detail/polynomial_horner1_2.hpp
vendored
Normal file
36
test/external/boost/math/tools/detail/polynomial_horner1_2.hpp
vendored
Normal file
@@ -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* a, 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
|
||||
|
||||
144
test/external/boost/math/tools/detail/polynomial_horner1_20.hpp
vendored
Normal file
144
test/external/boost/math/tools/detail/polynomial_horner1_20.hpp
vendored
Normal file
@@ -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* a, 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
|
||||
|
||||
42
test/external/boost/math/tools/detail/polynomial_horner1_3.hpp
vendored
Normal file
42
test/external/boost/math/tools/detail/polynomial_horner1_3.hpp
vendored
Normal file
@@ -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* a, 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
|
||||
|
||||
48
test/external/boost/math/tools/detail/polynomial_horner1_4.hpp
vendored
Normal file
48
test/external/boost/math/tools/detail/polynomial_horner1_4.hpp
vendored
Normal file
@@ -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* a, 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
|
||||
|
||||
54
test/external/boost/math/tools/detail/polynomial_horner1_5.hpp
vendored
Normal file
54
test/external/boost/math/tools/detail/polynomial_horner1_5.hpp
vendored
Normal file
@@ -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* a, 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
|
||||
|
||||
60
test/external/boost/math/tools/detail/polynomial_horner1_6.hpp
vendored
Normal file
60
test/external/boost/math/tools/detail/polynomial_horner1_6.hpp
vendored
Normal file
@@ -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* a, 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
|
||||
|
||||
66
test/external/boost/math/tools/detail/polynomial_horner1_7.hpp
vendored
Normal file
66
test/external/boost/math/tools/detail/polynomial_horner1_7.hpp
vendored
Normal file
@@ -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* a, 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
|
||||
|
||||
72
test/external/boost/math/tools/detail/polynomial_horner1_8.hpp
vendored
Normal file
72
test/external/boost/math/tools/detail/polynomial_horner1_8.hpp
vendored
Normal file
@@ -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* a, 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
|
||||
|
||||
78
test/external/boost/math/tools/detail/polynomial_horner1_9.hpp
vendored
Normal file
78
test/external/boost/math/tools/detail/polynomial_horner1_9.hpp
vendored
Normal file
@@ -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* a, 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
|
||||
|
||||
90
test/external/boost/math/tools/detail/polynomial_horner2_10.hpp
vendored
Normal file
90
test/external/boost/math/tools/detail/polynomial_horner2_10.hpp
vendored
Normal file
@@ -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* a, 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
|
||||
|
||||
97
test/external/boost/math/tools/detail/polynomial_horner2_11.hpp
vendored
Normal file
97
test/external/boost/math/tools/detail/polynomial_horner2_11.hpp
vendored
Normal file
@@ -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* a, 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
|
||||
|
||||
104
test/external/boost/math/tools/detail/polynomial_horner2_12.hpp
vendored
Normal file
104
test/external/boost/math/tools/detail/polynomial_horner2_12.hpp
vendored
Normal file
@@ -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* a, 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
|
||||
|
||||
111
test/external/boost/math/tools/detail/polynomial_horner2_13.hpp
vendored
Normal file
111
test/external/boost/math/tools/detail/polynomial_horner2_13.hpp
vendored
Normal file
@@ -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* a, 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
|
||||
|
||||
118
test/external/boost/math/tools/detail/polynomial_horner2_14.hpp
vendored
Normal file
118
test/external/boost/math/tools/detail/polynomial_horner2_14.hpp
vendored
Normal file
@@ -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* a, 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
|
||||
|
||||
125
test/external/boost/math/tools/detail/polynomial_horner2_15.hpp
vendored
Normal file
125
test/external/boost/math/tools/detail/polynomial_horner2_15.hpp
vendored
Normal file
@@ -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* a, 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
|
||||
|
||||
132
test/external/boost/math/tools/detail/polynomial_horner2_16.hpp
vendored
Normal file
132
test/external/boost/math/tools/detail/polynomial_horner2_16.hpp
vendored
Normal file
@@ -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* a, 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
|
||||
|
||||
139
test/external/boost/math/tools/detail/polynomial_horner2_17.hpp
vendored
Normal file
139
test/external/boost/math/tools/detail/polynomial_horner2_17.hpp
vendored
Normal file
@@ -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* a, 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
|
||||
|
||||
146
test/external/boost/math/tools/detail/polynomial_horner2_18.hpp
vendored
Normal file
146
test/external/boost/math/tools/detail/polynomial_horner2_18.hpp
vendored
Normal file
@@ -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* a, 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
|
||||
|
||||
153
test/external/boost/math/tools/detail/polynomial_horner2_19.hpp
vendored
Normal file
153
test/external/boost/math/tools/detail/polynomial_horner2_19.hpp
vendored
Normal file
@@ -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* a, 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
|
||||
|
||||
48
test/external/boost/math/tools/detail/polynomial_horner2_2.hpp
vendored
Normal file
48
test/external/boost/math/tools/detail/polynomial_horner2_2.hpp
vendored
Normal file
@@ -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* a, 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
|
||||
|
||||
160
test/external/boost/math/tools/detail/polynomial_horner2_20.hpp
vendored
Normal file
160
test/external/boost/math/tools/detail/polynomial_horner2_20.hpp
vendored
Normal file
@@ -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* a, 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
|
||||
|
||||
48
test/external/boost/math/tools/detail/polynomial_horner2_3.hpp
vendored
Normal file
48
test/external/boost/math/tools/detail/polynomial_horner2_3.hpp
vendored
Normal file
@@ -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* a, 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
|
||||
|
||||
48
test/external/boost/math/tools/detail/polynomial_horner2_4.hpp
vendored
Normal file
48
test/external/boost/math/tools/detail/polynomial_horner2_4.hpp
vendored
Normal file
@@ -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* a, 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
|
||||
|
||||
55
test/external/boost/math/tools/detail/polynomial_horner2_5.hpp
vendored
Normal file
55
test/external/boost/math/tools/detail/polynomial_horner2_5.hpp
vendored
Normal file
@@ -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* a, 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
|
||||
|
||||
62
test/external/boost/math/tools/detail/polynomial_horner2_6.hpp
vendored
Normal file
62
test/external/boost/math/tools/detail/polynomial_horner2_6.hpp
vendored
Normal file
@@ -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* a, 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
|
||||
|
||||
69
test/external/boost/math/tools/detail/polynomial_horner2_7.hpp
vendored
Normal file
69
test/external/boost/math/tools/detail/polynomial_horner2_7.hpp
vendored
Normal file
@@ -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* a, 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
|
||||
|
||||
76
test/external/boost/math/tools/detail/polynomial_horner2_8.hpp
vendored
Normal file
76
test/external/boost/math/tools/detail/polynomial_horner2_8.hpp
vendored
Normal file
@@ -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* a, 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
|
||||
|
||||
83
test/external/boost/math/tools/detail/polynomial_horner2_9.hpp
vendored
Normal file
83
test/external/boost/math/tools/detail/polynomial_horner2_9.hpp
vendored
Normal file
@@ -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* a, 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
|
||||
|
||||
156
test/external/boost/math/tools/detail/polynomial_horner3_10.hpp
vendored
Normal file
156
test/external/boost/math/tools/detail/polynomial_horner3_10.hpp
vendored
Normal file
@@ -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* a, 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
|
||||
|
||||
181
test/external/boost/math/tools/detail/polynomial_horner3_11.hpp
vendored
Normal file
181
test/external/boost/math/tools/detail/polynomial_horner3_11.hpp
vendored
Normal file
@@ -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* a, 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
|
||||
|
||||
208
test/external/boost/math/tools/detail/polynomial_horner3_12.hpp
vendored
Normal file
208
test/external/boost/math/tools/detail/polynomial_horner3_12.hpp
vendored
Normal file
@@ -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* a, 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
|
||||
|
||||
237
test/external/boost/math/tools/detail/polynomial_horner3_13.hpp
vendored
Normal file
237
test/external/boost/math/tools/detail/polynomial_horner3_13.hpp
vendored
Normal file
@@ -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* a, 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
|
||||
|
||||
268
test/external/boost/math/tools/detail/polynomial_horner3_14.hpp
vendored
Normal file
268
test/external/boost/math/tools/detail/polynomial_horner3_14.hpp
vendored
Normal file
@@ -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* a, 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
|
||||
|
||||
301
test/external/boost/math/tools/detail/polynomial_horner3_15.hpp
vendored
Normal file
301
test/external/boost/math/tools/detail/polynomial_horner3_15.hpp
vendored
Normal file
@@ -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* a, 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
|
||||
|
||||
336
test/external/boost/math/tools/detail/polynomial_horner3_16.hpp
vendored
Normal file
336
test/external/boost/math/tools/detail/polynomial_horner3_16.hpp
vendored
Normal file
@@ -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* a, 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
|
||||
|
||||
373
test/external/boost/math/tools/detail/polynomial_horner3_17.hpp
vendored
Normal file
373
test/external/boost/math/tools/detail/polynomial_horner3_17.hpp
vendored
Normal file
@@ -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* a, 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
|
||||
|
||||
412
test/external/boost/math/tools/detail/polynomial_horner3_18.hpp
vendored
Normal file
412
test/external/boost/math/tools/detail/polynomial_horner3_18.hpp
vendored
Normal file
@@ -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* a, 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
|
||||
|
||||
453
test/external/boost/math/tools/detail/polynomial_horner3_19.hpp
vendored
Normal file
453
test/external/boost/math/tools/detail/polynomial_horner3_19.hpp
vendored
Normal file
@@ -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* a, 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
|
||||
|
||||
48
test/external/boost/math/tools/detail/polynomial_horner3_2.hpp
vendored
Normal file
48
test/external/boost/math/tools/detail/polynomial_horner3_2.hpp
vendored
Normal file
@@ -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* a, 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
|
||||
|
||||
496
test/external/boost/math/tools/detail/polynomial_horner3_20.hpp
vendored
Normal file
496
test/external/boost/math/tools/detail/polynomial_horner3_20.hpp
vendored
Normal file
@@ -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* a, 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
|
||||
|
||||
48
test/external/boost/math/tools/detail/polynomial_horner3_3.hpp
vendored
Normal file
48
test/external/boost/math/tools/detail/polynomial_horner3_3.hpp
vendored
Normal file
@@ -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* a, 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
|
||||
|
||||
48
test/external/boost/math/tools/detail/polynomial_horner3_4.hpp
vendored
Normal file
48
test/external/boost/math/tools/detail/polynomial_horner3_4.hpp
vendored
Normal file
@@ -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* a, 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
|
||||
|
||||
61
test/external/boost/math/tools/detail/polynomial_horner3_5.hpp
vendored
Normal file
61
test/external/boost/math/tools/detail/polynomial_horner3_5.hpp
vendored
Normal file
@@ -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* a, 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
|
||||
|
||||
76
test/external/boost/math/tools/detail/polynomial_horner3_6.hpp
vendored
Normal file
76
test/external/boost/math/tools/detail/polynomial_horner3_6.hpp
vendored
Normal file
@@ -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* a, 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
|
||||
|
||||
93
test/external/boost/math/tools/detail/polynomial_horner3_7.hpp
vendored
Normal file
93
test/external/boost/math/tools/detail/polynomial_horner3_7.hpp
vendored
Normal file
@@ -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* a, 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
|
||||
|
||||
112
test/external/boost/math/tools/detail/polynomial_horner3_8.hpp
vendored
Normal file
112
test/external/boost/math/tools/detail/polynomial_horner3_8.hpp
vendored
Normal file
@@ -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* a, 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
|
||||
|
||||
133
test/external/boost/math/tools/detail/polynomial_horner3_9.hpp
vendored
Normal file
133
test/external/boost/math/tools/detail/polynomial_horner3_9.hpp
vendored
Normal file
@@ -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* a, 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
|
||||
|
||||
138
test/external/boost/math/tools/detail/rational_horner1_10.hpp
vendored
Normal file
138
test/external/boost/math/tools/detail/rational_horner1_10.hpp
vendored
Normal file
@@ -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
|
||||
|
||||
150
test/external/boost/math/tools/detail/rational_horner1_11.hpp
vendored
Normal file
150
test/external/boost/math/tools/detail/rational_horner1_11.hpp
vendored
Normal file
@@ -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
|
||||
|
||||
162
test/external/boost/math/tools/detail/rational_horner1_12.hpp
vendored
Normal file
162
test/external/boost/math/tools/detail/rational_horner1_12.hpp
vendored
Normal file
@@ -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
|
||||
|
||||
174
test/external/boost/math/tools/detail/rational_horner1_13.hpp
vendored
Normal file
174
test/external/boost/math/tools/detail/rational_horner1_13.hpp
vendored
Normal file
@@ -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
|
||||
|
||||
186
test/external/boost/math/tools/detail/rational_horner1_14.hpp
vendored
Normal file
186
test/external/boost/math/tools/detail/rational_horner1_14.hpp
vendored
Normal file
@@ -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
|
||||
|
||||
198
test/external/boost/math/tools/detail/rational_horner1_15.hpp
vendored
Normal file
198
test/external/boost/math/tools/detail/rational_horner1_15.hpp
vendored
Normal file
@@ -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
|
||||
|
||||
210
test/external/boost/math/tools/detail/rational_horner1_16.hpp
vendored
Normal file
210
test/external/boost/math/tools/detail/rational_horner1_16.hpp
vendored
Normal file
@@ -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
|
||||
|
||||
222
test/external/boost/math/tools/detail/rational_horner1_17.hpp
vendored
Normal file
222
test/external/boost/math/tools/detail/rational_horner1_17.hpp
vendored
Normal file
@@ -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
|
||||
|
||||
234
test/external/boost/math/tools/detail/rational_horner1_18.hpp
vendored
Normal file
234
test/external/boost/math/tools/detail/rational_horner1_18.hpp
vendored
Normal file
@@ -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
|
||||
|
||||
246
test/external/boost/math/tools/detail/rational_horner1_19.hpp
vendored
Normal file
246
test/external/boost/math/tools/detail/rational_horner1_19.hpp
vendored
Normal file
@@ -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
|
||||
|
||||
42
test/external/boost/math/tools/detail/rational_horner1_2.hpp
vendored
Normal file
42
test/external/boost/math/tools/detail/rational_horner1_2.hpp
vendored
Normal file
@@ -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
|
||||
|
||||
258
test/external/boost/math/tools/detail/rational_horner1_20.hpp
vendored
Normal file
258
test/external/boost/math/tools/detail/rational_horner1_20.hpp
vendored
Normal file
@@ -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
|
||||
|
||||
54
test/external/boost/math/tools/detail/rational_horner1_3.hpp
vendored
Normal file
54
test/external/boost/math/tools/detail/rational_horner1_3.hpp
vendored
Normal file
@@ -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
|
||||
|
||||
66
test/external/boost/math/tools/detail/rational_horner1_4.hpp
vendored
Normal file
66
test/external/boost/math/tools/detail/rational_horner1_4.hpp
vendored
Normal file
@@ -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
|
||||
|
||||
78
test/external/boost/math/tools/detail/rational_horner1_5.hpp
vendored
Normal file
78
test/external/boost/math/tools/detail/rational_horner1_5.hpp
vendored
Normal file
@@ -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
|
||||
|
||||
90
test/external/boost/math/tools/detail/rational_horner1_6.hpp
vendored
Normal file
90
test/external/boost/math/tools/detail/rational_horner1_6.hpp
vendored
Normal file
@@ -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
|
||||
|
||||
102
test/external/boost/math/tools/detail/rational_horner1_7.hpp
vendored
Normal file
102
test/external/boost/math/tools/detail/rational_horner1_7.hpp
vendored
Normal file
@@ -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
|
||||
|
||||
114
test/external/boost/math/tools/detail/rational_horner1_8.hpp
vendored
Normal file
114
test/external/boost/math/tools/detail/rational_horner1_8.hpp
vendored
Normal file
@@ -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
|
||||
|
||||
126
test/external/boost/math/tools/detail/rational_horner1_9.hpp
vendored
Normal file
126
test/external/boost/math/tools/detail/rational_horner1_9.hpp
vendored
Normal file
@@ -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
|
||||
|
||||
144
test/external/boost/math/tools/detail/rational_horner2_10.hpp
vendored
Normal file
144
test/external/boost/math/tools/detail/rational_horner2_10.hpp
vendored
Normal file
@@ -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* a, const U* b, 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
|
||||
|
||||
160
test/external/boost/math/tools/detail/rational_horner2_11.hpp
vendored
Normal file
160
test/external/boost/math/tools/detail/rational_horner2_11.hpp
vendored
Normal file
@@ -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* a, const U* b, 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
|
||||
|
||||
176
test/external/boost/math/tools/detail/rational_horner2_12.hpp
vendored
Normal file
176
test/external/boost/math/tools/detail/rational_horner2_12.hpp
vendored
Normal file
@@ -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* a, const U* b, 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
|
||||
|
||||
192
test/external/boost/math/tools/detail/rational_horner2_13.hpp
vendored
Normal file
192
test/external/boost/math/tools/detail/rational_horner2_13.hpp
vendored
Normal file
@@ -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* a, const U* b, 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
|
||||
|
||||
208
test/external/boost/math/tools/detail/rational_horner2_14.hpp
vendored
Normal file
208
test/external/boost/math/tools/detail/rational_horner2_14.hpp
vendored
Normal file
@@ -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* a, const U* b, 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
|
||||
|
||||
224
test/external/boost/math/tools/detail/rational_horner2_15.hpp
vendored
Normal file
224
test/external/boost/math/tools/detail/rational_horner2_15.hpp
vendored
Normal file
@@ -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* a, const U* b, 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
|
||||
|
||||
240
test/external/boost/math/tools/detail/rational_horner2_16.hpp
vendored
Normal file
240
test/external/boost/math/tools/detail/rational_horner2_16.hpp
vendored
Normal file
@@ -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* a, const U* b, 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
|
||||
|
||||
256
test/external/boost/math/tools/detail/rational_horner2_17.hpp
vendored
Normal file
256
test/external/boost/math/tools/detail/rational_horner2_17.hpp
vendored
Normal file
@@ -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* a, const U* b, 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
|
||||
|
||||
272
test/external/boost/math/tools/detail/rational_horner2_18.hpp
vendored
Normal file
272
test/external/boost/math/tools/detail/rational_horner2_18.hpp
vendored
Normal file
@@ -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* a, const U* b, 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
|
||||
|
||||
288
test/external/boost/math/tools/detail/rational_horner2_19.hpp
vendored
Normal file
288
test/external/boost/math/tools/detail/rational_horner2_19.hpp
vendored
Normal file
@@ -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* a, const U* b, 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
|
||||
|
||||
48
test/external/boost/math/tools/detail/rational_horner2_2.hpp
vendored
Normal file
48
test/external/boost/math/tools/detail/rational_horner2_2.hpp
vendored
Normal file
@@ -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* a, const U* b, 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
|
||||
|
||||
304
test/external/boost/math/tools/detail/rational_horner2_20.hpp
vendored
Normal file
304
test/external/boost/math/tools/detail/rational_horner2_20.hpp
vendored
Normal file
@@ -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* a, const U* b, 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
|
||||
|
||||
48
test/external/boost/math/tools/detail/rational_horner2_3.hpp
vendored
Normal file
48
test/external/boost/math/tools/detail/rational_horner2_3.hpp
vendored
Normal file
@@ -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* a, const U* b, 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
|
||||
|
||||
48
test/external/boost/math/tools/detail/rational_horner2_4.hpp
vendored
Normal file
48
test/external/boost/math/tools/detail/rational_horner2_4.hpp
vendored
Normal file
@@ -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* a, const U* b, 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
|
||||
|
||||
64
test/external/boost/math/tools/detail/rational_horner2_5.hpp
vendored
Normal file
64
test/external/boost/math/tools/detail/rational_horner2_5.hpp
vendored
Normal file
@@ -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* a, const U* b, 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
|
||||
|
||||
80
test/external/boost/math/tools/detail/rational_horner2_6.hpp
vendored
Normal file
80
test/external/boost/math/tools/detail/rational_horner2_6.hpp
vendored
Normal file
@@ -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* a, const U* b, 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
|
||||
|
||||
96
test/external/boost/math/tools/detail/rational_horner2_7.hpp
vendored
Normal file
96
test/external/boost/math/tools/detail/rational_horner2_7.hpp
vendored
Normal file
@@ -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* a, const U* b, 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
|
||||
|
||||
112
test/external/boost/math/tools/detail/rational_horner2_8.hpp
vendored
Normal file
112
test/external/boost/math/tools/detail/rational_horner2_8.hpp
vendored
Normal file
@@ -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* a, const U* b, 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
|
||||
|
||||
128
test/external/boost/math/tools/detail/rational_horner2_9.hpp
vendored
Normal file
128
test/external/boost/math/tools/detail/rational_horner2_9.hpp
vendored
Normal file
@@ -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* a, const U* b, 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
|
||||
|
||||
396
test/external/boost/math/tools/detail/rational_horner3_10.hpp
vendored
Normal file
396
test/external/boost/math/tools/detail/rational_horner3_10.hpp
vendored
Normal file
@@ -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* a, const U* b, 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
|
||||
|
||||
482
test/external/boost/math/tools/detail/rational_horner3_11.hpp
vendored
Normal file
482
test/external/boost/math/tools/detail/rational_horner3_11.hpp
vendored
Normal file
@@ -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* a, const U* b, 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
|
||||
|
||||
576
test/external/boost/math/tools/detail/rational_horner3_12.hpp
vendored
Normal file
576
test/external/boost/math/tools/detail/rational_horner3_12.hpp
vendored
Normal file
@@ -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* a, const U* b, 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
|
||||
|
||||
678
test/external/boost/math/tools/detail/rational_horner3_13.hpp
vendored
Normal file
678
test/external/boost/math/tools/detail/rational_horner3_13.hpp
vendored
Normal file
@@ -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* a, const U* b, 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
|
||||
|
||||
788
test/external/boost/math/tools/detail/rational_horner3_14.hpp
vendored
Normal file
788
test/external/boost/math/tools/detail/rational_horner3_14.hpp
vendored
Normal file
@@ -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* a, const U* b, 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
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user