Message94423
> 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. |
|
Date |
User |
Action |
Args |
2009-10-24 15:21:42 | mark.dickinson | set | recipients:
+ mark.dickinson, loewis, aleax, rhettinger, ggenellina, christian.heimes, mancausoft |
2009-10-24 15:21:42 | mark.dickinson | set | messageid: <1256397702.31.0.67920123032.issue1678380@psf.upfronthosting.co.za> |
2009-10-24 15:21:41 | mark.dickinson | link | issue1678380 messages |
2009-10-24 15:21:40 | mark.dickinson | create | |
|