Kaydet (Commit) f1ed9342 authored tarafından Tim Peters's avatar Tim Peters

_PyFloat_Pack4(): Removed needless call of floor().

üst bc4ded9b
...@@ -960,7 +960,7 @@ _PyFloat_Pack4(double x, unsigned char *p, int le) ...@@ -960,7 +960,7 @@ _PyFloat_Pack4(double x, unsigned char *p, int le)
} }
f *= 8388608.0; /* 2**23 */ f *= 8388608.0; /* 2**23 */
fbits = (long) floor(f + 0.5); /* Round */ fbits = (unsigned int)(f + 0.5); /* Round */
assert(fbits <= 8388608); assert(fbits <= 8388608);
if (fbits >> 23) { if (fbits >> 23) {
/* The carry propagated out of a string of 23 1 bits. */ /* The carry propagated out of a string of 23 1 bits. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment