[Numpy-discussion] np.longlong casts to int

Pierre Haessig pierre.haessig at crans.org
Fri Feb 24 07:43:23 EST 2012


Hi,
Le 24/02/2012 01:00, Matthew Brett a écrit :
> Right - no proposal to change float64 because it's not ambiguous - it
> is both binary64 IEEE floating point format and 64 bit width.
All right ! Focusing the renaming only on those "extended precision"
float types makes sense.
> The confusion here is for float128 - which is very occasionally IEEE
> binary128 and can be at least two other things (PPC twin double, and
> Intel 80 bit padded to 128 bits).  Some of us were also surprised to
> find float96 is the same precision as float128 (being an 80 bit Intel
> padded to 96 bits).
>
> The renaming is an attempt to make it less confusing.   Do you agree
> the renaming is less confusing?  Do you have another proposal?
>
> Preferring 'longdouble' is precisely to flag up to people that they
> may need to do some more research to find out what exactly that is.
> Which is correct :)

The renaming scheme you mentionned (float80_96, float80_128,
float128_ieee, float_pair_128 ) is very informative, maybe too much !
(In this list, I would shorten float128_ieee -> float128  though).

So in the end, I may concur with you on "longdouble" as a good name for
"extended precision" in the Intel 80 bits sense. (Should "longfloat" be
deprecated ?).
float128 may be kept for ieee definition only, since it looks like the
natural extension of float64. Maybe one day it will be available on our
"standard" machines ?

Also I just browsed  Wikipedia's page [1] to get a bit of background and
I wonder what is the use case of these 80 bits numbers apart from what
is described as "keeping intermediate results" when performing
exponentiation on doubles ?

Best,
Pierre

[1] http://en.wikipedia.org/wiki/Extended_precision

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 900 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20120224/957850e7/attachment.sig>


More information about the NumPy-Discussion mailing list