Mark Wiebe <mwwi...@gmail.com> added the comment:

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!

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue11734>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to