> […]
> I don't really want to play with big numbers; I want to compute a
> P-value. It's just that the formula for the binomial distribution
> happens to involve large numbers as intermediate results.
You can choose:
1) Either use exact results that needs "arbitrary precision" libraries.
Even if you calculate (n choose p) more efficiently by alternating
multiplications and (integer) divisions. The integers still becomes
quite big.
2) Use floating point arithmetics. The precision of IEEE double is far
enough for your calculations. :-)
Lars R.
Post a reply to this message
|