[Numpy-discussion] [Pytables-users] On Numexpr and uint64 type

Charles R Harris charlesr.harris at gmail.com
Tue Mar 11 10:56:33 EDT 2008


On Tue, Mar 11, 2008 at 4:00 AM, Francesc Altet <faltet at carabos.com> wrote:

> A Tuesday 11 March 2008, Francesc Altet escrigué:
> > The thing that makes uint64 so special is that it is the largest
> > integer (in current processors) that has a native representation
> > (i.e. the processor can operate directly on them, so they can be
> > processed very fast), and besides, there is no other (common native)
> > type that can fully include all its precision (float64 has a mantissa
> > of 53 bits, so this is not enough to represent 64 bits).  So the
> > problem is basically what to do when operations with uint64 have
> > overflows (or underflows, like for example, dealing with negative
> > values).
>
> Mmm, I'm thinking now that there exist a relatively common floating
> point that have a mantissa of 64 bit (at minimum), namely the extended
> precision ploating point [1] (in its 80-bit incarnation, it is an IEEE
> standard).  In modern platforms, this is avalaible as a 'long double',
> and I'm wondering whether it would be useful for Numexpr purposes, but
> seems like it is.
>

Extended precision is iffy. It doesn't work on all platforms and even when
it does the implementation can be strange. I think the normal double is the
only thing you can count on right now.

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


More information about the NumPy-Discussion mailing list