Statistics
| Revision:

root / branches / pthreads-737 / src / linad99 / cinvcumdt.cpp @ 765

History | View | Annotate | Download (533 Bytes)

1
/*
2
 * $Id: cinvcumdt.cpp 542 2012-07-10 21:04:06Z johnoel $
3
 *
4
 * Author: David Fournier
5
 * Copyright (c) 2008-2012 Regents of the University of California 
6
 */
7
/**
8
 * \file
9
 * Description not yet available.
10
 */
11
#include <admodel.h>
12

    
13
/**
14
 * Description not yet available.
15
 * \param
16
 */
17
double inv_cumd_t(double n,double u,double eps)
18
{
19
  double v,sgn;
20
  if (u<0.5)
21
  {
22
    v=2.0*u;
23
    sgn=-1.0;
24
  }
25
  else
26
  {
27
    v=2.0*(1.0-u);
28
    sgn=1.0;
29
  }
30
  double w=inv_cumd_beta_stable(0.5*n,0.5,v,eps);
31
  return sgn*sqrt(n*(1.0/w-1.0));
32
}