Kaydet (Commit) 02139d74 authored tarafından Mark Dickinson's avatar Mark Dickinson

Fix buggy comparison: LHS of comparison was being treated as unsigned.

üst 6e0d3d67
......@@ -1141,7 +1141,7 @@ sulp(U *x, BCinfo *bc)
{
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 */
word0(&u) = (P+2)*Exp_msk1;
word1(&u) = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment