[Numpy-discussion] [Numpy] quadruple precision
Wed Feb 29 12:14:34 CST 2012
On Wed, Feb 29, 2012 at 12:13 PM, Jonathan Rocher <firstname.lastname@example.org> wrote:
> Thanks to your question, I discovered that there is a float128 dtype in
> In: np.__version__
> Out: '1.6.1'
> In: np.float128?
> Type: type
> Base Class: <type 'type'>
> String Form:<type 'numpy.float128'>
> Namespace: Interactive
> 128-bit floating-point number. Character code: 'g'. C long float
Right - but remember that numpy float128 is different on different
platforms. In particular, float128 is any C longdouble type that
needs 128 bits of memory, regardless of precision or implementation.
See  for background on C longdouble type.
The numpy platforms I know about are:
Intel : 80 bit float padded to 128 bits 
PPC : pair of float64 values 
Debian IBM s390 : real quadruple precision  
I see that some Sun machines implement real quadruple precision in
software but I haven't run numpy on a Sun machine 
> Based on some reported issues, it seems like there are issues though with
> this and its mapping to python long integer...
I tried to summarize the problems I knew about here:
There are some routines to deal with some of the problems here:
After spending some time with the various longdoubles in numpy, I have
learned to stare at my code for a long time considering how it might
run into the various problems above.
More information about the NumPy-Discussion