Opened 5 years ago
Closed 4 years ago
#13344 closed Bugs (obsolete)
Noncentral chi-squared distribution with 0 degrees of freedom
Reported by: | Owned by: | John Maddock | |
---|---|---|---|
Milestone: | To Be Determined | Component: | math |
Version: | Boost 1.65.0 | Severity: | Problem |
Keywords: | Cc: |
Description
Hello,
Boost returns an error when we supply 0 for the degrees of freedom of chi-squared distribution:
#include <iostream> #include <cmath> #include "boost/math/distributions/non_central_chi_squared.hpp" int main(){ std::cout << boost::math::cdf(boost::math::non_central_chi_squared(0, 1), 1); return 0; }
Error in function boost::math::non_central_chi_squared_distribution<double>::non_central_chi_squared_distribution(double,double): Degrees of freedom argument is 0, but must be > 0 ''
However this distribution makes sense. It has a density.
Note:
See TracTickets
for help on using tickets.
Moved to https://github.com/boostorg/math/issues/142