| Line 28... |
Line 28... |
| 28 |
*
|
28 |
*
|
| 29 |
* To compute the binomial probability, call dbinom(x,n,p).
|
29 |
* To compute the binomial probability, call dbinom(x,n,p).
|
| 30 |
* This checks for argument validity, and calls dbinom_raw().
|
30 |
* This checks for argument validity, and calls dbinom_raw().
|
| 31 |
*
|
31 |
*
|
| 32 |
* dbinom_raw() does the actual computation; note this is called by
|
32 |
* dbinom_raw() does the actual computation; note this is called by
|
| 33 |
* other functions in addition to dbinom().
|
33 |
* many other functions in addition to dbinom():
|
| - |
|
34 |
* dnbinom(), dbeta(), df(), dgeom(), dhyper()
|
| 34 |
* (1) dbinom_raw() has both p and q arguments, when one may be represented
|
35 |
* (1) dbinom_raw() has both p and q arguments, when one may be represented
|
| 35 |
* more accurately than the other (in particular, in df()).
|
36 |
* more accurately than the other (in particular, in df()).
|
| 36 |
* (2) dbinom_raw() does NOT check that inputs x and n are integers. This
|
37 |
* (2) dbinom_raw() does NOT check that inputs x and n are integers. This
|
| 37 |
* should be done in the calling function, where necessary.
|
38 |
* should be done in the calling function, where necessary.
|
| 38 |
* -- but is not the case at all when called e.g., from df() or dbeta() !
|
39 |
* -- but is not the case at all when called e.g., from df() or dbeta() !
|