homepage

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 kristjan.jonsson
Recipients eric.snow, jcea, kristjan.jonsson, mark.dickinson, michael.foord, pitrou, rhettinger, serhiy.storchaka
Date 2012年04月19日.21:06:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1334869588.83.0.175336699938.issue14381@psf.upfronthosting.co.za>
In-reply-to
Content
return *(PY_LONG_LONG*)&fval == 0;
There is no aliasing, because there are no pointer variables in existence.
If we did this:
double *pfval = &fval;
PY_LONG_LONG *pl = (PY_LONG_LONG*)pfval
return *pfval == 0
Then we would have aliasing. Because "pfval" in this example doesn't exist but is merely a temporary, there is no aliasing.
As for IEEE compatibility, I don't think we could have our own floating point formatting library if we didn't make that assumption, but I might be wrong about that. On the other hand, I don't think there is a supported python architecture that defines positive zero as anything else than bitwise zero. And should such a platform be found, it is easy enough to disable this code for it.
History
Date User Action Args
2012年04月19日 21:06:28kristjan.jonssonsetrecipients: + kristjan.jonsson, rhettinger, jcea, mark.dickinson, pitrou, michael.foord, eric.snow, serhiy.storchaka
2012年04月19日 21:06:28kristjan.jonssonsetmessageid: <1334869588.83.0.175336699938.issue14381@psf.upfronthosting.co.za>
2012年04月19日 21:06:28kristjan.jonssonlinkissue14381 messages
2012年04月19日 21:06:28kristjan.jonssoncreate

AltStyle によって変換されたページ (->オリジナル) /