The R Project SVN R

Rev

Rev 86264 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 86264 Rev 87903
Line 2... Line 2...
2
 *  AUTHOR
2
 *  AUTHOR
3
 *    Catherine Loader, catherine@research.bell-labs.com.
3
 *    Catherine Loader, catherine@research.bell-labs.com.
4
 *    October 23, 2000.
4
 *    October 23, 2000.
5
 *
5
 *
6
 *  Merge in to R:
6
 *  Merge in to R:
7
 *	Copyright (C) 2000-2024, The R Core Team
7
 *	Copyright (C) 2000-2025, The R Core Team
8
 *
8
 *
9
 *  This program is free software; you can redistribute it and/or modify
9
 *  This program is free software; you can redistribute it and/or modify
10
 *  it under the terms of the GNU General Public License as published by
10
 *  it under the terms of the GNU General Public License as published by
11
 *  the Free Software Foundation; either version 2 of the License, or
11
 *  the Free Software Foundation; either version 2 of the License, or
12
 *  (at your option) any later version.
12
 *  (at your option) any later version.
Line 48... Line 48...
48
 *                                        including pgamma(), hence ppois(), ..
48
 *                                        including pgamma(), hence ppois(), ..
49
 
49
 
50
 *     stirlerr(n), stirlerr(x), stirlerr(n-x) from binom_raw(x, n, ..) for all possible 0 < x < n
50
 *     stirlerr(n), stirlerr(x), stirlerr(n-x) from binom_raw(x, n, ..) for all possible 0 < x < n
51
 */
51
 */
52
 
52
 
53
double attribute_hidden stirlerr(double n)
53
attribute_hidden double stirlerr(double n)
54
{
54
{
55
 
55
 
56
#define S0 0.083333333333333333333       /* 1/12 */
56
#define S0 0.083333333333333333333       /* 1/12 */
57
#define S1 0.00277777777777777777778     /* 1/360 */
57
#define S1 0.00277777777777777777778     /* 1/360 */
58
#define S2 0.00079365079365079365079365  /* 1/1260 */
58
#define S2 0.00079365079365079365079365  /* 1/1260 */