Subject: [Boost-bugs] [Boost C++ Libraries] #8837: boost::math::students_t quantile() fails for huge degrees of freedom
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-07-17 16:32:29
#8837: boost::math::students_t quantile() fails for huge degrees of freedom
--------------------------------------+-------------------------
Reporter: Paul McClellan <paulm@â¦> | Owner: johnmaddock
Type: Bugs | Status: new
Milestone: To Be Determined | Component: math
Version: Boost 1.54.0 | Severity: Problem
Keywords: math |
--------------------------------------+-------------------------
Student's t quantile function calls policies::raise_rounding_error() in
iround() when degrees of freedom = 4503599627370496.
boost::math::students_t students(4503599627370496);
double dRes = quantile(students, 0.4);
If this is disabled using
#define BOOST_MATH_ROUNDING_ERROR_POLICY ignore_error
in user.hpp the computation will continue.
The function inverse_students_t_hill() uses the test ndf > 1e20 to use the
Standard Normal approximation, but Boost subsequently attempts to refine
the estimate using the Halley step in fast_students_t_quantile_imp() and
this becomes unreliable and eventually fails for huge dof such as dof =
DBL_MAX (results in completely wrong result) or +Infinity (returns a NaN).
For consistency, I suggest the quantile function us the same threshold as
pdf() and cdf() to approximate the Student's t with the standard normal
distribution when dof > 1/eps.
I will attempt to attach my user.hpp file.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/8837> 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:13 UTC