]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
_PyFloat_Pack4(): Removed needless call of floor().
authorTim Peters <tim.peters@gmail.com>
Fri, 21 Mar 2003 17:10:03 +0000 (17:10 +0000)
committerTim Peters <tim.peters@gmail.com>
Fri, 21 Mar 2003 17:10:03 +0000 (17:10 +0000)
Objects/floatobject.c

index 3cbc98a24be83443b78bd6c3f941a6877678514c..f7601ba9e7d46daecb1a1b78a5706651ea8027b4 100644 (file)
@@ -960,7 +960,7 @@ _PyFloat_Pack4(double x, unsigned char *p, int le)
        }
 
        f *= 8388608.0; /* 2**23 */
-       fbits = (long) floor(f + 0.5); /* Round */
+       fbits = (unsigned int)(f + 0.5); /* Round */
        assert(fbits <= 8388608);
        if (fbits >> 23) {
                /* The carry propagated out of a string of 23 1 bits. */