Terry Reedy [EMAIL PROTECTED] writes:
Grant Edwards [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I'm working on it. I should have said it's trivial if you have
access to the platforms to be supported. I've tested a fix
that supports pickle streams generated under Win32 and
On Thu, 23 Jun 2005 00:11:20 -0400, Tim Peters wrote:
Well, I try, Ivan. But lest the point be missed wink, 754 doesn't
_want_ +0 and -0 to act differently in almost any way. The only
good rationale I've seen for why it makes the distinction at all is in
Kahan's paper Branch Cuts for
[Tim Peters']
Well, I try, Ivan. But lest the point be missed wink, 754 doesn't
_want_ +0 and -0 to act differently in almost any way. The only
good rationale I've seen for why it makes the distinction at all is in
Kahan's paper Branch Cuts for Complex
Elementary Functions, or Much Ado
Hi All--
Tim Peters wrote:
Fortran is so
eager to allow optimizations that failure due to numeric differences
in conformance tests rarely withstood challenge.
+1 QOTW
Metta,
Ivan
--
Ivan Van Laningham
God N Locomotive Works
Tim Peters wrote:
[Steven D'Aprano]
It isn't necessary to look at complex numbers to see the difference
between positive and negative zero. Just look at a graph of y=1/x. In
particular, look at the behaviour of the graph around x=0. Now tell me
that the sign of zero doesn't make a difference.
Tim Peters wrote:
OK, I looked, and it made no difference to me. Really. If I had an
infinitely tall monitor, maybe I could see a difference, but I don't
-- the sign of 0 on the nose makes no difference to the behavior of
1/x for any x other than 0. On my finite monitor, I see it looks
On 2005-06-22, Scott David Daniels [EMAIL PROTECTED] wrote:
I finally figured out why one of my apps sometimes fails under
Win32 when it always works fine under Linux: Under Win32, the
pickle module only works with a subset of floating point
values. In particular the if you try to dump/load
Grant Edwards wrote:
On 2005-06-22, Scott David Daniels [EMAIL PROTECTED] wrote:
...Under Win32, the pickle module only works with a subset of
floating point values. In particular ... infinity or nan ...
There is no completely portable way to do this.
Python deals with all sorts of problems
On 2005-06-22, Scott David Daniels [EMAIL PROTECTED] wrote:
Fixing it is really quite trivial. It takes less than a dozen
lines of code. Just catch the exception and handle it.
Since you know it is quite trivial, and I don't, why not
submit a patch resolving this issue. Be sure to include
Grant Edwards wrote:
I'm working on it. I should have said it's trivial if you have
access to the platforms to be supported. I've tested a fix
that supports pickle streams generated under Win32 and glibc.
That's using the native string representation of a NaN or
Inf.
Several issues:
(1) The
Grant Edwards [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I'm working on it. I should have said it's trivial if you have
access to the platforms to be supported. I've tested a fix
that supports pickle streams generated under Win32 and glibc.
That's using the native string
On 2005-06-22, Scott David Daniels [EMAIL PROTECTED] wrote:
I'm working on it. I should have said it's trivial if you have
access to the platforms to be supported. I've tested a fix
that supports pickle streams generated under Win32 and glibc.
That's using the native string representation
Grant Edwards [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
The bit patterns are defined by the IEEE 754 standard. If
there are Python-hosting platoforms that don't use IEEE 754 as
the floating point representation, then that can be dealt with.
Python has _tons_ of
Grant Edwards wrote:
On 2005-06-22, Scott David Daniels [EMAIL PROTECTED] wrote:
Several issues:
(1) The number of distinct NaNs varies among platforms.
According to the IEEE standard, there are exactly two:
signalling and quiet, and on platforms that don't impliment
floating point
Scott David Daniels [EMAIL PROTECTED] writes:
Negative 0 isn't a NaN, it's just negative 0.
Right, but it is hard to construct in standard C.
Huh? It's just a hex constant.
--
http://mail.python.org/mailman/listinfo/python-list
Paul Rubin wrote:
Scott David Daniels [EMAIL PROTECTED] writes:
Negative 0 isn't a NaN, it's just negative 0.
Right, but it is hard to construct in standard C.
Huh? It's just a hex constant.
Well, -0.0 doesn't work, and (double)0x8000 doesn't work,
and I think you have to use
[with the start of US summer comes the start of 754 ranting season]
[Grant Edwards]
Negative 0 isn't a NaN, it's just negative 0.
[Scott David Daniels]
Right, but it is hard to construct in standard C.
[Paul Rubin]
Huh? It's just a hex constant.
[Scott David Daniels]
Well, -0.0 doesn't
Scott David Daniels [EMAIL PROTECTED] writes:
Negative 0 isn't a NaN, it's just negative 0.
Right, but it is hard to construct in standard C.
Huh? It's just a hex constant.
Well, -0.0 doesn't work, and (double)0x8000 doesn't work,
and I think you have to use quirks of a compiler
On 2005-06-22, Scott David Daniels [EMAIL PROTECTED] wrote:
Grant Edwards wrote:
On 2005-06-22, Scott David Daniels [EMAIL PROTECTED] wrote:
Several issues:
(1) The number of distinct NaNs varies among platforms.
According to the IEEE standard, there are exactly two:
signalling and
On 2005-06-22, Paul Rubin http wrote:
Negative 0 isn't a NaN, it's just negative 0.
Right, but it is hard to construct in standard C.
Huh? It's just a hex constant.
Yup. There are two ways to construct a NaN. One is to do
something like (1e300*1e300)/(1e300*1e300) and hope for the
best.
On 2005-06-23, Paul Rubin http wrote:
Scott David Daniels [EMAIL PROTECTED] writes:
Negative 0 isn't a NaN, it's just negative 0.
Right, but it is hard to construct in standard C.
Huh? It's just a hex constant.
Well, -0.0 doesn't work, and (double)0x8000 doesn't work,
and I think
On 2005-06-23, Tim Peters [EMAIL PROTECTED] wrote:
C89 doesn't define the result of that, but most C compilers these
days will create a negative 0.
and (double)0x8000 doesn't work,
I think you meant something like
float f;
*((uint32_t*)d) = 0x;
And I don't know how to test
On 2005-06-23, Grant Edwards [EMAIL PROTECTED] wrote:
On 2005-06-23, Tim Peters [EMAIL PROTECTED] wrote:
C89 doesn't define the result of that, but most C compilers these
days will create a negative 0.
and (double)0x8000 doesn't work,
I think you meant something like
float f;
Hi All--
Tim Peters wrote:
Across platforms with a 754-conforming
libm, the most portable way is via using atan2(!):
pz = 0.0
mz = -pz
from math import atan2
atan2(pz, pz)
0.0
atan2(mz, mz)
-3.1415926535897931
Never fails. Tim, you gave me the best laugh of the day.
Metta,
I finally figured out why one of my apps sometimes fails under
Win32 when it always works fine under Linux: Under Win32, the
pickle module only works with a subset of floating point
values. In particular the if you try to dump/load an infinity
or nan value, the load operation chokes:
Under
On 2005-06-21, Grant Edwards [EMAIL PROTECTED] wrote:
I finally figured out why one of my apps sometimes fails under
Win32 when it always works fine under Linux
[...]
Oh, I forgot, here's pickletest.py:
#!/usr/bin/python
import pickle
f1 = (1e300*1e300)
f2 = f1/f1
o = (f1,f2)
s =
26 matches
Mail list logo