[Numpy-discussion] Log Arrays

Charles R Harris charlesr.harris at gmail.com
Thu May 8 12:25:37 EDT 2008


On Thu, May 8, 2008 at 10:11 AM, Anne Archibald <peridot.faceted at gmail.com>
wrote:

> 2008/5/8 Charles R Harris <charlesr.harris at gmail.com>:
> >
> > What realistic probability is in the range exp(-1000) ?
>
> Well, I ran into it while doing a maximum-likelihood fit - my early
> guesses had exceedingly low probabilities, but I needed to know which
> way the probabilities were increasing.
>

The number of bosons in the universe is only on the order of 1e-42.
Exp(-1000) may be convenient, but as a probability it is a delusion. The
hypothesis "none of the above" would have a much larger prior.

But to expand on David's computation... If the numbers are stored without
using logs, i.e., as the exponentials, then the sum is of the form:

x_1*2**y_1 + ... + x_i*2**y_i

Where 1<= x_j < 2 and both x_i and y_i are available. When the numbers are
all of the same general magnitude you get essentially the same result as
David's formula by simply by dividing out the first value.

Chuck

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20080508/9801d95f/attachment.html>


More information about the NumPy-Discussion mailing list