[Numpy-discussion] np.longlong casts to int

Robert Pyle rpyle@post.harvard....
Fri Feb 24 09:38:25 CST 2012


On Feb 24, 2012, at 7:43 AM, Pierre Haessig wrote:

> 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 ?

In AIFF audio files, the sample rate is stored in the Common Chunk as an 80-bit "extended" floating-point number.  The field allocated for this is exactly 80 bits wide (i.e., no padding to 96 or 128).  The 1989 Apple document defining AIFF can be found at </www-mmsp.ece.mcgill.ca/documents/audioformats/aiff/Docs/AIFF-1.3.pdf>

I once wrote my own "save as AIFF" routine and I remember it was a pain to format the 80-bit extended float.

Bob Pyle
> 
> Best,
> Pierre
> 
> [1] http://en.wikipedia.org/wiki/Extended_precision
> 
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion



More information about the NumPy-Discussion mailing list