namespace airy_zero
{
- template<class T>
- T equation_as_10_4_105(const T& z)
+ template<class T, class Policy>
+ T equation_as_10_4_105(const T& z, const Policy& pol)
{
const T one_over_z (T(1) / z);
const T one_over_z_squared(one_over_z * one_over_z);
- const T z_pow_third (boost::math::cbrt(z));
+ const T z_pow_third (boost::math::cbrt(z, pol));
const T z_pow_two_thirds(z_pow_third * z_pow_third);
// Implement the top line of Eq. 10.4.105.
namespace airy_ai_zero_detail
{
- template<class T>
- T initial_guess(const int m)
+ template<class T, class Policy>
+ T initial_guess(const int m, const Policy& pol)
{
T guess;
default:
{
const T t(((boost::math::constants::pi<T>() * 3) * ((T(m) * 4) - 1)) / 8);
- guess = -boost::math::detail::airy_zero::equation_as_10_4_105(t);
+ guess = -boost::math::detail::airy_zero::equation_as_10_4_105(t, pol);
break;
}
}
namespace airy_bi_zero_detail
{
- template<class T>
- T initial_guess(const int m)
+ template<class T, class Policy>
+ T initial_guess(const int m, const Policy& pol)
{
T guess;
default:
{
const T t(((boost::math::constants::pi<T>() * 3) * ((T(m) * 4) - 3)) / 8);
- guess = -boost::math::detail::airy_zero::equation_as_10_4_105(t);
+ guess = -boost::math::detail::airy_zero::equation_as_10_4_105(t, pol);
break;
}
}