[Numpy-discussion] Log Arrays

Nadav Horesh nadavh at visionsense.com
Thu May 8 13:06:57 EDT 2008


Is the 80 bits float (float96 on IA32, float128 on AMD64) isn't enough? It has a 64 bits mantissa and can represent numbers up to nearly 1E(+-)5000.

  Nadav.


-----הודעה מקורית-----
מאת: numpy-discussion-bounces at scipy.org בשם Charles R Harris
נשלח: ה 08-מאי-08 19:25
אל: Discussion of Numerical Python
נושא: Re: [Numpy-discussion] Log Arrays
 
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 --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 3794 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20080508/752df5bb/attachment.bin>


More information about the NumPy-Discussion mailing list