~ubuntu-branches/ubuntu/karmic/python-scipy/karmic

« back to all changes in this revision

Viewing changes to Lib/special/cephes/btdtr.c

  • Committer: Bazaar Package Importer
  • Author(s): Ondrej Certik
  • Date: 2008-06-16 22:58:01 UTC
  • mfrom: (2.1.24 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080616225801-irdhrpcwiocfbcmt
Tags: 0.6.0-12
* The description updated to match the current SciPy (Closes: #489149).
* Standards-Version bumped to 3.8.0 (no action needed)
* Build-Depends: netcdf-dev changed to libnetcdf-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
 
/*                                                      btdtr.c
3
 
 *
4
 
 *      Beta distribution
5
 
 *
6
 
 *
7
 
 *
8
 
 * SYNOPSIS:
9
 
 *
10
 
 * double a, b, x, y, btdtr();
11
 
 *
12
 
 * y = btdtr( a, b, x );
13
 
 *
14
 
 *
15
 
 *
16
 
 * DESCRIPTION:
17
 
 *
18
 
 * Returns the area from zero to x under the beta density
19
 
 * function:
20
 
 *
21
 
 *
22
 
 *                          x
23
 
 *            -             -
24
 
 *           | (a+b)       | |  a-1      b-1
25
 
 * P(x)  =  ----------     |   t    (1-t)    dt
26
 
 *           -     -     | |
27
 
 *          | (a) | (b)   -
28
 
 *                         0
29
 
 *
30
 
 *
31
 
 * This function is identical to the incomplete beta
32
 
 * integral function incbet(a, b, x).
33
 
 *
34
 
 * The complemented function is
35
 
 *
36
 
 * 1 - P(1-x)  =  incbet( b, a, x );
37
 
 *
38
 
 *
39
 
 * ACCURACY:
40
 
 *
41
 
 * See incbet.c.
42
 
 *
43
 
 */
44
 
 
45
 
/*                                                              btdtr() */
46
 
 
47
 
 
48
 
/*
49
 
Cephes Math Library Release 2.0:  April, 1987
50
 
Copyright 1984, 1987, 1995 by Stephen L. Moshier
51
 
*/
52
 
 
53
 
#include "mconf.h"
54
 
 
55
 
#define ANSIPROT
56
 
#ifndef ANSIPROT
57
 
double incbet();
58
 
#else
59
 
extern double incbet ( double aa, double bb, double xx );
60
 
double btdtr( double,double,double );
61
 
#endif
62
 
 
63
 
double btdtr( a, b, x )
64
 
double a, b, x;
65
 
{
66
 
 
67
 
return( incbet( a, b, x ) );
68
 
}