[Boost-bugs] [Boost C++ Libraries] #13344: Noncentral chi-squared distribution with 0 degrees of freedom

Subject: [Boost-bugs] [Boost C++ Libraries] #13344: Noncentral chi-squared distribution with 0 degrees of freedom
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2017-12-14 17:04:36


#13344: Noncentral chi-squared distribution with 0 degrees of freedom
-----------------------------------------------+--------------------------
 Reporter: Stéphane Laurent <laurent_step@…> | Owner: John Maddock
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: math
  Version: Boost 1.65.0 | Severity: Problem
 Keywords: |
-----------------------------------------------+--------------------------
 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.

-- 
Ticket URL: <https://svn.boost.org/trac10/boost/ticket/13344>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-12-14 17:14:18 UTC