Subject: [Boost-bugs] [Boost C++ Libraries] #10111: quantile at p=1 for non-central chi-squared---regression bug?
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-06-11 03:41:11
#10111: quantile at p=1 for non-central chi-squared---regression bug?
-------------------------------------+-------------------------
Reporter: HS <tan@â¦> | Owner: johnmaddock
Type: Bugs | Status: new
Milestone: To Be Determined | Component: math
Version: Boost Development Trunk | Severity: Regression
Keywords: |
-------------------------------------+-------------------------
I think this used to work as expected a while ago:
{{{
#include <cstdlib>
#include <cstdio>
#include <boost/math/distributions/non_central_chi_squared.hpp>
#include <boost/math/distributions/chi_squared.hpp>
int main()
{
const double _df = 1.2;
const double _nc = 2.5;
const double _p = 1.0;
std::printf(
"\nchi-squared: quantile( p=%g, df=%g ) = %g\n",
_p, _df,
boost::math::quantile(
boost::math::chi_squared_distribution<>( _df ),
_p ) );
std::printf(
"non-central chi-squared: quantile( p=%g, df=%g, nc=%g ) =
%g\n\n",
_p, _df, _nc,
boost::math::quantile(
boost::math::non_central_chi_squared_distribution<>( _df, _nc
),
_p ) );
return EXIT_SUCCESS;
}
}}}
When built with "g++ -o test chisq.cpp" (after saving the above as
"chisq.cpp") on a Linux box, this currently returns
{{{
chi-squared: quantile( p=1, df=1.2 ) = inf
non-central chi-squared: quantile( p=1, df=1.2, nc=2.5 ) = 1.79769e+308
}}}
when ran; I expected both to return inf.
Thank you,[[br]]
HS
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/10111> 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-02-16 18:50:16 UTC