[Numpy-discussion] float128 / longdouble on PPC - is it broken?
Tue Oct 25 18:49:01 CDT 2011
On Tue, Oct 25, 2011 at 2:58 PM, David Cournapeau <firstname.lastname@example.org> wrote:
> On Tue, Oct 25, 2011 at 8:22 PM, Matthew Brett <email@example.com> wrote:
>> On Tue, Oct 25, 2011 at 12:14 PM, Pauli Virtanen <firstname.lastname@example.org> wrote:
>>> 25.10.2011 20:29, Matthew Brett kirjoitti:
>>>> In : (res-1) / 2**32
>>>> Out: 8589934591.9999999998
>>>> In : np.float((res-1) / 2**32)
>>>> Out: 4294967296.0
>>> Looks like a bug in the C library installed on the machine, then.
>>> It's either in wontfix territory for us, or in the "cast to doubles
>>> before formatting" one. In the latter case, one would have to maintain a
>>> list of broken C libraries (ugh).
>> How about a check at import time and a warning when printing? Is that
>> hard to do?
> That's fragile IMO. I think that Chuck summed it well: long double are
> not portable, don't use them unless you have to or you can rely on
That reminds me of the old joke about the Irishman giving directions -
"If I were you, I wouldn't start from here".
> I would rather spend some time on implementing/integrating portable
> quad precision in software,
I guess from your answer that such a warning would be complicated to
implement, and if that's the case, I can imagine it would be low
More information about the NumPy-Discussion