//
// Mathematically undefined properties:
//
- typedef typename detail::find_arg<arg_list, is_assert_undefined<mpl::_1>, discrete_quantile<> >::type assert_undefined_type;
+ typedef typename detail::find_arg<arg_list, is_assert_undefined<mpl::_1>, assert_undefined<> >::type assert_undefined_type;
//
// Max iterations:
//
//
// Mathematically undefined properties:
//
- typedef typename detail::find_arg<arg_list, is_assert_undefined<mpl::_1>, discrete_quantile<> >::type assert_undefined_type;
+ typedef typename detail::find_arg<arg_list, is_assert_undefined<mpl::_1>, typename Policy::assert_undefined_type >::type assert_undefined_type;
//
// Max iterations:
//
- typedef typename detail::find_arg<arg_list, is_max_series_iterations<mpl::_1>, max_series_iterations<> >::type max_series_iterations_type;
- typedef typename detail::find_arg<arg_list, is_max_root_iterations<mpl::_1>, max_root_iterations<> >::type max_root_iterations_type;
+ typedef typename detail::find_arg<arg_list, is_max_series_iterations<mpl::_1>, typename Policy::max_series_iterations_type>::type max_series_iterations_type;
+ typedef typename detail::find_arg<arg_list, is_max_root_iterations<mpl::_1>, typename Policy::max_root_iterations_type>::type max_root_iterations_type;
//
// Define a typelist of the policies:
//
template <class Real, class Policy>
struct precision
{
+ BOOST_STATIC_ASSERT( ::std::numeric_limits<Real>::radix == 2);
typedef typename Policy::precision_type precision_type;
typedef basic_digits<Real> digits_t;
typedef typename mpl::if_<
template <class Real, class Policy>
struct precision
{
+ BOOST_STATIC_ASSERT((::std::numeric_limits<Real>::radix == 2) || ((::std::numeric_limits<Real>::is_specialized == 0) || (::std::numeric_limits<Real>::digits == 0)));
#ifndef __BORLANDC__
typedef typename Policy::precision_type precision_type;
typedef typename mpl::if_c<
#endif
+#ifdef BOOST_MATH_USE_FLOAT128
+
+template <class Policy>
+struct precision<__float128, Policy>
+{
+ typedef mpl::int_<113> type;
+};
+
+#endif
+
namespace detail{
template <class T, class Policy>
{
#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
BOOST_STATIC_ASSERT( ::std::numeric_limits<T>::is_specialized);
+ BOOST_STATIC_ASSERT( ::std::numeric_limits<T>::radix == 2);
#else
BOOST_ASSERT(::std::numeric_limits<T>::is_specialized);
+ BOOST_ASSERT(::std::numeric_limits<T>::radix == 2);
#endif
typedef typename boost::math::policies::precision<T, Policy>::type p_t;
typedef mpl::bool_<p_t::value <= std::numeric_limits<boost::uintmax_t>::digits> is_small_int;
template <class T, class Policy>
inline T get_epsilon(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T))
{
- typedef mpl::bool_< std::numeric_limits<T>::is_specialized > tag_type;
+ typedef mpl::bool_< (std::numeric_limits<T>::is_specialized && (std::numeric_limits<T>::radix == 2)) > tag_type;
return detail::get_epsilon_imp<T, Policy>(tag_type());
}
template <class P>
struct is_policy : public mpl::bool_< ::boost::math::policies::detail::is_policy_imp<P>::value> {};
+//
+// Helper traits class for distribution error handling:
+//
+template <class Policy>
+struct constructor_error_check
+{
+ typedef typename Policy::domain_error_type domain_error_type;
+ typedef typename mpl::if_c<
+ (domain_error_type::value == throw_on_error) || (domain_error_type::value == user_error),
+ mpl::true_,
+ mpl::false_>::type type;
+};
+
+template <class Policy>
+struct method_error_check
+{
+ typedef typename Policy::domain_error_type domain_error_type;
+ typedef typename mpl::if_c<
+ (domain_error_type::value == throw_on_error) && (domain_error_type::value != user_error),
+ mpl::false_,
+ mpl::true_>::type type;
+};
+
}}} // namespaces
#endif // BOOST_MATH_POLICY_HPP