This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mark.dickinson
Recipients eric.smith, loewis, mark.dickinson, mattip
Date 2012-04-09.16:25:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1333988743.28.0.187801712096.issue14521@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2012-04-09 16:25:43mark.dickinsonsetrecipients: + mark.dickinson, loewis, eric.smith, mattip
2012-04-09 16:25:43mark.dickinsonsetmessageid: <1333988743.28.0.187801712096.issue14521@psf.upfronthosting.co.za>
2012-04-09 16:25:42mark.dickinsonlinkissue14521 messages
2012-04-09 16:25:42mark.dickinsoncreate