/[gsl]/gsl/cdf/tdist.c
ViewVC logotype

Diff of /gsl/cdf/tdist.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1.2.1 by bjg, Mon Jun 23 17:21:51 2003 UTC revision 1.1.2.2 by bjg, Tue Jun 24 14:13:15 2003 UTC
# Line 44  Line 44 
44    
45  #include "beta_inc.c"  #include "beta_inc.c"
46    
 #if 0  
 /*  
  * First approximation is also found in Abramowitz  
  * and Stegun. This is used only for small values of t  
  * and small degrees of freedom.  
  */  
 static double  
 t_small (const double t, const double nu)  
 {  
   /* Compute beta_inc when t^2 < n. Final result is always a small  
      amount to be added to or subtracted from 0.5 so we only need  
      absolute accuracy of O(DBL_EPS) -- this information could be used  
      to optimise inside beta_inc (currently it isn't) */  
   
   double u = (t * t) / nu;  
   double eps = u / (1 + u);  
   double q = beta_inc (0.5, nu / 2.0, eps);  
   
   return q;  
 }  
   
 static double  
 t_large (const double t, const double nu)  
 {  
   /* Compute beta_inc when t^2 > n.  Final result may be needed to full  
      relative precision, depending on whether we are computing the  
      upper or lower tail.  Again this information could be used to  
      optimise inside beta_inc.  */  
   
   double v = nu / (t * t);  
   double eps = v / (1 + v);  
   double q = beta_inc (nu / 2.0, 0.5, eps);  
   
   return q;  
 }  
   
 #endif  
   
47  static double  static double
48  poly_eval (const double c[], unsigned int n, double x)  poly_eval (const double c[], unsigned int n, double x)
49  {  {
# Line 167  cornish_fisher (double t, double n) Line 129  cornish_fisher (double t, double n)
129   * a point u such that gsl_cdf_gauss(u) = tcdf(t).   * a point u such that gsl_cdf_gauss(u) = tcdf(t).
130   * Approximate the t cdf with gsl_cdf_gauss.   * Approximate the t cdf with gsl_cdf_gauss.
131   *   *
132   * Valid for:   * Valid for: ????
133   *   *
134   */   */
135  static double  static double

Legend:
Removed from v.1.1.2.1  
changed lines
  Added in v.1.1.2.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26