Mark Dickinson added the comment:
Antoine: is it okay to close this as wont fix?
--
assignee: - mark.dickinson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22590
___
Antoine Pitrou added the comment:
Yep, it's ok.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22590
___
___
Python-bugs-list mailing list
Changes by Mark Dickinson dicki...@gmail.com:
--
resolution: - wont fix
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22590
___
New submission from Antoine Pitrou:
Z:\c:\Python27\python.exe
Python 2.7.8 (default, Jun 30 2014, 16:03:49) [MSC v.1500 32 bit (Intel)] on
win32
Type help, copyright, credits or license for more information.
import math
math.copysign(0.0, float(nan))
-0.0
^Z
Z:\c:\Python34\python.exe
Mark Dickinson added the comment:
Why do you consider this a bug?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22590
___
___
Python-bugs-list
Mark Dickinson added the comment:
More info: the reason for the difference is that in Python 3.4, float(nan)
and float(inf) create the float directly from the appropriate bit-pattern,
rather than deferring to the platform's definition of nan. This change was
introduced to avoid obscure
Antoine Pitrou added the comment:
Ah, apparently it was already reported as issue14521...
Well, it's bug in as much as it shows different behaviour across platforms...
AFAICT, we try to provide consistent math behaviour despite possible platform
variations.
--
Antoine Pitrou added the comment:
Also, the fact that we support float('nan') and float('-nan') as producing
different bit patterns means we should perhaps produce the right sign bit for
each (it seems that's the problem here).
import struct
struct.pack(d, float(nan))
Mark Dickinson added the comment:
we should perhaps produce the right sign bit for each
Perhaps. But given that signs of NaNs are pretty much meaningless anyway (the
IEEE 754 standard explicitly refuses to attach any meaning to NaN sign bits,
and the sign bit of a NaN result is not
Antoine Pitrou added the comment:
Yes, things are ok under 3.x. We'll probably disable our NaN tests under
Windows anyway, since they aren't very useful as you point out.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22590
10 matches
Mail list logo