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

Diff of /gsl/cdf/cauchyinv.c

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

revision 1.1.2.1 by bjg, Sun Jul 20 18:19:18 2003 UTC revision 1.1.2.2 by bjg, Mon Jul 21 16:51:21 2003 UTC
# Line 36  gsl_cdf_cauchy_Pinv (const double P, con Line 36  gsl_cdf_cauchy_Pinv (const double P, con
36        return GSL_NEGINF;        return GSL_NEGINF;
37      }      }
38    
39    x = a * tan (M_PI * (P - 0.5));    if (P > 0.5)
40        {
41          x = a * tan (M_PI * (P - 0.5));
42        }
43      else
44        {
45          x = -a / tan (M_PI * P);
46        }
47    
48    return x;    return x;
49  }  }
# Line 55  gsl_cdf_cauchy_Qinv (const double Q, con Line 62  gsl_cdf_cauchy_Qinv (const double Q, con
62        return 0.0;        return 0.0;
63      }      }
64    
65    x = a * tan (M_PI * (0.5 - Q));    if (Q > 0.5)
66        {
67          x = a * tan (M_PI * (0.5 - Q));
68        }
69      else
70        {
71          x = a / tan (M_PI * Q);
72        }
73    
74    return x;    return x;
75  }  }

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