The R Project SVN R

Rev

Rev 33718 | Rev 42302 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 33718 Rev 34643
Line 48... Line 48...
48
 *	   If (i > 7), use Stirling's approximation, otherwise use table lookup.
48
 *	   If (i > 7), use Stirling's approximation, otherwise use table lookup.
49
*/
49
*/
50
 
50
 
51
static double afc(int i)
51
static double afc(int i)
52
{
52
{
53
    const double al[9] =
53
    const static double al[9] =
54
    {
54
    {
55
	0.0,
55
	0.0,
56
	0.0,/*ln(0!)=ln(1)*/
56
	0.0,/*ln(0!)=ln(1)*/
57
	0.0,/*ln(1!)=ln(1)*/
57
	0.0,/*ln(1!)=ln(1)*/
58
	0.69314718055994530941723212145817,/*ln(2) */
58
	0.69314718055994530941723212145817,/*ln(2) */
Line 79... Line 79...
79
    return value;
79
    return value;
80
}
80
}
81
 
81
 
82
double rhyper(double nn1in, double nn2in, double kkin)
82
double rhyper(double nn1in, double nn2in, double kkin)
83
{
83
{
84
    const double con = 57.56462733;
84
    const static double con = 57.56462733;
85
    const double deltal = 0.0078;
85
    const static double deltal = 0.0078;
86
    const double deltau = 0.0034;
86
    const static double deltau = 0.0034;
87
    const double scale = 1e25;
87
    const static double scale = 1e25;
88
 
88
 
89
    /* extern double afc(int); */
89
    /* extern double afc(int); */
90
 
90
 
91
    int nn1, nn2, kk;
91
    int nn1, nn2, kk;
92
    int i, ix;
92
    int i, ix;