2
0
mirror of https://github.com/boostorg/math.git synced 2026-01-19 04:22:09 +00:00

Bessel_I0: decimal number types shouldn't use numeric_limits::digits to judge precision.

This commit is contained in:
jzmaddock
2017-05-21 08:49:06 +01:00
parent 05dfd72a56
commit 37783e519a
2 changed files with 5 additions and 1 deletions

View File

@@ -532,7 +532,9 @@ template <typename T>
inline T bessel_i0(const T& x)
{
typedef mpl::int_<
std::numeric_limits<T>::digits == 0 ?
(std::numeric_limits<T>::radix != 2) ?
-1 :
(std::numeric_limits<T>::digits == 0) ?
0 :
std::numeric_limits<T>::digits <= 24 ?
24 :

View File

@@ -555,6 +555,8 @@ template <typename T>
inline T bessel_i1(const T& x)
{
typedef mpl::int_<
(std::numeric_limits<T>::radix != 2) ?
-1 :
std::numeric_limits<T>::digits == 0 ?
0 :
std::numeric_limits<T>::digits <= 24 ?