Ignore:
Timestamp:
Oct 7, 2008, 6:06:50 PM (13 years ago)
Author:
Peter
Message:

fixes #450

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/statistics/utility.cc

    r1487 r1553  
    4747    if (n<=2)
    4848      return std::numeric_limits<double>::quiet_NaN();
     49    if (r>=1.0)
     50      return 0.0;
     51    if (r<=-1.0)
     52      return 1.0;
    4953    return gsl_cdf_tdist_Q(r*sqrt((n-2)/(1-r*r)), n-2);
    5054  }
Note: See TracChangeset for help on using the changeset viewer.