Statistics
| Revision:

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

History | View | Annotate | Download (560 Bytes)

1
/*
2
 * $Id: ccumdexp.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 <fvar.hpp>
12

    
13
/**
14
 * Description not yet available.
15
 * \param
16
 */
17
double inv_cumd_exponential(double y)
18
{
19
  if (y<=0.5)
20
    return log(2.0*y);
21
  else
22
    return log(2.0*(1-y));
23
}
24

    
25
/**
26
 * Description not yet available.
27
 * \param
28
 */
29
double cumd_exponential(double x)
30
{
31
  if (x<=0.0)
32
    return 0.5*exp(x);
33
  else
34
    return 1.0-0.5*exp(-x);
35
}