mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
_PyFloat_Pack4(): Removed needless call of floor().
This commit is contained in:
parent
bc4ded9bc0
commit
f1ed934278
1 changed files with 1 additions and 1 deletions
|
@ -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. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue