2
0
mirror of https://github.com/boostorg/math.git synced 2026-01-28 07:22:12 +00:00

Comment only on change to use normal for

(v > 1 / boost::math::tools::epsilon<T>() 

[SVN r80196]
This commit is contained in:
Paul A. Bristow
2012-08-25 10:13:27 +00:00
parent e5723529c2
commit 4a1ccd574e

View File

@@ -320,8 +320,8 @@ namespace boost
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 @@ namespace boost
{
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));