From: Tim Peters Date: Fri, 21 Mar 2003 17:10:03 +0000 (+0000) Subject: _PyFloat_Pack4(): Removed needless call of floor(). X-Git-Tag: v2.3c1~1399 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f1ed9342781ddea9464f0e3a291fb94b0730d45b;p=thirdparty%2FPython%2Fcpython.git _PyFloat_Pack4(): Removed needless call of floor(). --- diff --git a/Objects/floatobject.c b/Objects/floatobject.c index 3cbc98a24be8..f7601ba9e7d4 100644 --- a/Objects/floatobject.c +++ b/Objects/floatobject.c @@ -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. */