Mark Dickinson <dicki...@gmail.com> added the comment: > I try: *p==0 && p[sizeof(double)-1]==0 && p[(sizeof(double)-1)/2]==0;
Sure, that should work. It would seem cleaner and safer to use copysign, though: that way, things will still work when some other byte layout comes along, or when some version of Python starts using 128-bit IEEE 754 doubles instead of 64-bit, or ... Reopening: I've been meaning to fix these checks to use copysign for a while now, anyway. ---------- priority: high -> normal resolution: accepted -> stage: -> needs patch status: closed -> open type: -> behavior versions: +Python 2.6, Python 2.7, Python 3.1, Python 3.2 -Python 2.5 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue1678380> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com