Mark Dickinson <dicki...@gmail.com> added the comment:

Thanks for the updated patch!  (BTW, you can attach patches as files to the 
issue rather than writing them inline.)

Yes, this patch is more along the lines that I was thinking of.  There are some 
issues, though:  (1) we need to deal with endianness issues (including the ARM 
mixed-endian case).  (2) It looks to me as though the (double *) cast violates 
strict aliasing rules;  gcc's optimizations can do nasty things in this area.

Rather than reinventing the wheel, we should use the same mechanisms as are 
already in Python's version of dtoa.c (e.g., see the use of the union to deal 
with aliasing issues);  we may even be able to steal bits of David Gay's 
original code directly.

I'll try to find time to look at this in the near future.  I'm still not 
convinced that anything really needs to change here, though.

I don't understand your comment about pickled objects;  as far as I'm aware 
there aren't any issues with transferring pickled NaNs from one system to 
another.

----------
assignee:  -> mark.dickinson
nosy: +eric.smith
priority: normal -> low
stage:  -> needs patch
type: behavior -> enhancement
versions: +Python 3.3 -Python 2.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue14521>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to