[Numpy-discussion] float128 in fact float80

David Cournapeau cournape at gmail.com
Sun Oct 16 17:11:44 EDT 2011


On Sun, Oct 16, 2011 at 7:40 PM, Matthew Brett <matthew.brett at gmail.com> wrote:
> Hi,

> If we use float64 we know what that is.  If we are using float128,
> we've got no idea what it is.

I think there is no arguing here: the ideal solution would be to
follow what happens with 32 and 64 bits reprensentations. But this is
impossible on today's architectures because the 2008 version of the
IEEE 754 standard is not supported yet.

>
> I had actually guessed that numpy had some software emulation for IEEE
> float128.   I don't know how I would have known otherwise.
>
> Obviously what I'm proposing is that the names follow the precisions
> of the numbers, not the itemsize.
>
> If what we actually have is something that is sometimes called
> float128, sometimes float96, that is always what C thinks of as long
> double, then surely the best option  would be:
>
> float80
> floatLD
>
> for intel 32 and 64 bit, and then
>
> floatPPC
> floatLD
>
> for whatever PPC has, and so on.

If all you want is a common name, there is already one: np.longdouble.
This is an alias for the more platform-specific name.

cheers,

David



More information about the NumPy-Discussion mailing list