Statistics
| Revision:

root / branches / pthreads-737 / src / df1b2-separable / dfinvcumdt.cpp @ 765

History | View | Annotate | Download (634 Bytes)

1
/*
2
 * $Id: dfinvcumdt.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 <df1b2fun.h>
12

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