Message133073
Just a few small tweaks. I think you meant to subtract the second term here: + #('>e', b'\x80\x01', -2.0**-25 + 2.0**-35), # Rounds to minimum subnormal Isn't the "x < 0" part unnecessary? Maybe a comment explaining why the signbit function is used, to preserve -0, would help people who otherwise might think to replace it with "x < 0". + if (x < 0 || signbit(x)) { This is creating a signaling nan. It would be better to create a quiet nan by setting the highest order bit instead of the lowest order bit. + else if (isnan(x)) { + e = 0x1f; + bits = 1; + } Otherwise it looks great to me, good work! | |
| Date | User | Action | Args | | 2011-04-05 18:32:50 | mark.wiebe | set | recipients: + mark.wiebe, mark.dickinson, Eli.Stevens | | 2011-04-05 18:32:50 | mark.wiebe | set | messageid: <1302028370.85.0.0175190902585.issue11734@psf.upfronthosting.co.za> | | 2011-04-05 18:32:49 | mark.wiebe | link | issue11734 messages | | 2011-04-05 18:32:49 | mark.wiebe | create | | |