mirror of
https://github.com/python/cpython.git
synced 2025-07-28 13:44:43 +00:00
Fix buggy comparison: LHS of comparison was being treated as unsigned.
This commit is contained in:
parent
6e0d3d67fb
commit
02139d74ba
1 changed files with 1 additions and 1 deletions
|
@ -1141,7 +1141,7 @@ sulp(U *x, BCinfo *bc)
|
||||||
{
|
{
|
||||||
U u;
|
U u;
|
||||||
|
|
||||||
if (bc->scale && 2*P + 1 - ((word0(x) & Exp_mask) >> Exp_shift) > 0) {
|
if (bc->scale && 2*P + 1 > (int)((word0(x) & Exp_mask) >> Exp_shift)) {
|
||||||
/* rv/2^bc->scale is subnormal */
|
/* rv/2^bc->scale is subnormal */
|
||||||
word0(&u) = (P+2)*Exp_msk1;
|
word0(&u) = (P+2)*Exp_msk1;
|
||||||
word1(&u) = 0;
|
word1(&u) = 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue