|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r80196 - trunk/boost/math/distributions
From: pbristow_at_[hidden]
Date: 2012-08-25 06:13:28
Author: pbristow
Date: 2012-08-25 06:13:27 EDT (Sat, 25 Aug 2012)
New Revision: 80196
URL: http://svn.boost.org/trac/boost/changeset/80196
Log:
Comment only on change to use normal for
(v > 1 / boost::math::tools::epsilon<T>()
Text files modified:
trunk/boost/math/distributions/non_central_t.hpp | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
Modified: trunk/boost/math/distributions/non_central_t.hpp
==============================================================================
--- trunk/boost/math/distributions/non_central_t.hpp (original)
+++ trunk/boost/math/distributions/non_central_t.hpp 2012-08-25 06:13:27 EDT (Sat, 25 Aug 2012)
@@ -320,8 +320,8 @@
value_type guess = 0;
- if (boost::math::isinf(v))
- { // Infinite degrees of freedom, so use normal distribution located at delta.
+ if ( (boost::math::isinf(v)) || (v > 1 / boost::math::tools::epsilon<T>()) )
+ { // Infinite or very large degrees of freedom, so use normal distribution located at delta.
normal_distribution<T, Policy> n(delta, 1);
if (p < q)
{
@@ -331,7 +331,7 @@
{
return quantile(complement(n, q));
}
- }
+ }
else if(v > 3)
{ // Use normal distribution to calculate guess.
value_type mean = (v > 1 / policies::get_epsilon<T, Policy>()) ? delta : delta * sqrt(v / 2) * tgamma_delta_ratio((v - 1) * 0.5f, T(0.5f));
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk