summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2003-03-21 17:10:03 (GMT)
committerTim Peters <tim.peters@gmail.com>2003-03-21 17:10:03 (GMT)
commitf1ed9342781ddea9464f0e3a291fb94b0730d45b (patch)
treeb9b4121100e4802c4790b3b0d792a3a9bbda7017 /Objects
parentbc4ded9bc05f4c6924b5a7efc4dd9705999b99fa (diff)
downloadcpython-f1ed9342781ddea9464f0e3a291fb94b0730d45b.zip
cpython-f1ed9342781ddea9464f0e3a291fb94b0730d45b.tar.gz
cpython-f1ed9342781ddea9464f0e3a291fb94b0730d45b.tar.bz2
_PyFloat_Pack4(): Removed needless call of floor().
Diffstat (limited to 'Objects')
-rw-r--r--Objects/floatobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/floatobject.c b/Objects/floatobject.c
index 3cbc98a..f7601ba 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. */