> Division by a power of 2 is numerically very stable for binary
> arithmetics: It is just subtraction of the exponent. :-)
OK. But that still leaves me with the problem of computing the binomial
coefficient in the first place. Simply generating two vast numbers and
then expecting their quotient to be computed accurately isn't a very
good idea. I could probably use Pascal's triangle to compute it more
directly. (Let's face it, computing the factorials is iterative anyway.)
Given that the number I eventually want to arrive at is actually 10^-10,
it seems quite daft to arrive at that by computing huge integers.
(And this still doesn't help me if I want a P-value.)
> So where is the problem in calculating such expressions?
I don't have a copy of Maxima.
But that doesn't matter, because Wolfram Alpha can similarly give you a
numerical answer almost instantly.
The real problem is that I want to write computer software which
computes P-values for the results it obtains. The fact that all these
distributions are so numerically intractable to operate with makes that
a rather difficult task.
PS. Apparently Boost has functions for the PDF and CDF of many common
distributions. Who knew?
Post a reply to this message
|