Message158809
Interesting.
I declare that this rule does not apply here since the code is a deliberate hack: We are pretending that a certain address points to integers and checking those integers.
If you insist on following the standard, you could do
double cmp = 0;
return mcmcmp(&cmp, &fval, sizeof(fval)) == 0;
but on all real machines this is the same as:
PY_LONG_LONG cmp = 0;
return mcmcmp(&cmp, &fval, sizeof(fval)) == 0;
Which again is the same as
return *(PY_LONG_LONG*)&fval == 0;
technically speaking, even if the standard doesn't agree. You could implement this with in-line assembly and so cheerfully sidestep the standard.
When you're hacking, your're hacking and the standard isn't your friend :)
As for IEEE, sure, anyway that thing is oriented is fine, although in this day and age, I find it rather amusing that the logic thinks of IEEE support as the exception, rather than the rule.
Anyway, this proposal has been rejected due to lack of interest or some misguided idea of performance, so the point is moot. |
|
Date |
User |
Action |
Args |
2012-04-20 09:14:55 | kristjan.jonsson | set | recipients:
+ kristjan.jonsson, rhettinger, jcea, mark.dickinson, pitrou, michael.foord, eric.snow, serhiy.storchaka |
2012-04-20 09:14:55 | kristjan.jonsson | set | messageid: <1334913295.07.0.583844817948.issue14381@psf.upfronthosting.co.za> |
2012-04-20 09:14:54 | kristjan.jonsson | link | issue14381 messages |
2012-04-20 09:14:54 | kristjan.jonsson | create | |
|