@@ -1021,18 +1021,15 @@ T ibeta_imp(T a, T b, T x, const Policy& pol, bool inv, bool normalised, T* p_de
1021
1021
BOOST_MATH_ASSERT ((p_derivative == 0 ) || normalised);
1022
1022
1023
1023
if (!(boost::math::isfinite)(a))
1024
- return policies::raise_domain_error<T>(function, " The argument a to the incomplete beta function must be >= zero (got a=%1%)." , a, pol);
1024
+ return policies::raise_domain_error<T>(function, " The argument a to the incomplete beta function must be finite (got a=%1%)." , a, pol);
1025
1025
if (!(boost::math::isfinite)(b))
1026
- return policies::raise_domain_error<T>(function, " The argument b to the incomplete beta function must be >= zero (got b=%1%)." , b, pol);
1027
- if (!(boost::math::isfinite)(x ))
1026
+ return policies::raise_domain_error<T>(function, " The argument b to the incomplete beta function must be finite (got b=%1%)." , b, pol);
1027
+ if (!(0 <= x && x <= 1 ))
1028
1028
return policies::raise_domain_error<T>(function, " The argument x to the incomplete beta function must be in [0,1] (got x=%1%)." , x, pol);
1029
1029
1030
1030
if (p_derivative)
1031
1031
*p_derivative = -1 ; // value not set.
1032
1032
1033
- if ((x < 0 ) || (x > 1 ))
1034
- return policies::raise_domain_error<T>(function, " Parameter x outside the range [0,1] in the incomplete beta function (got x=%1%)." , x, pol);
1035
-
1036
1033
if (normalised)
1037
1034
{
1038
1035
if (a < 0 )
@@ -1422,18 +1419,16 @@ T ibeta_derivative_imp(T a, T b, T x, const Policy& pol)
1422
1419
// start with the usual error checks:
1423
1420
//
1424
1421
if (!(boost::math::isfinite)(a))
1425
- return policies::raise_domain_error<T>(function, " The argument a to the incomplete beta function must be >= zero (got a=%1%)." , a, pol);
1422
+ return policies::raise_domain_error<T>(function, " The argument a to the incomplete beta function must be finite (got a=%1%)." , a, pol);
1426
1423
if (!(boost::math::isfinite)(b))
1427
- return policies::raise_domain_error<T>(function, " The argument b to the incomplete beta function must be >= zero (got b=%1%)." , b, pol);
1428
- if (!(boost::math::isfinite)(x ))
1424
+ return policies::raise_domain_error<T>(function, " The argument b to the incomplete beta function must be finite (got b=%1%)." , b, pol);
1425
+ if (!(0 <= x && x <= 1 ))
1429
1426
return policies::raise_domain_error<T>(function, " The argument x to the incomplete beta function must be in [0,1] (got x=%1%)." , x, pol);
1430
1427
1431
1428
if (a <= 0 )
1432
1429
return policies::raise_domain_error<T>(function, " The argument a to the incomplete beta function must be greater than zero (got a=%1%)." , a, pol);
1433
1430
if (b <= 0 )
1434
1431
return policies::raise_domain_error<T>(function, " The argument b to the incomplete beta function must be greater than zero (got b=%1%)." , b, pol);
1435
- if ((x < 0 ) || (x > 1 ))
1436
- return policies::raise_domain_error<T>(function, " Parameter x outside the range [0,1] in the incomplete beta function (got x=%1%)." , x, pol);
1437
1432
//
1438
1433
// Now the corner cases:
1439
1434
//
0 commit comments