Skip to content

Commit

Permalink
Use correct exponent q, see details: ulfjack/ryu#117
Browse files Browse the repository at this point in the history
  • Loading branch information
plokhotnyuk committed Jun 5, 2019
1 parent 8136584 commit 2920ef7
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1681,7 +1681,7 @@ final class JsonWriter private[jsoniter_scala](
dvIsTrailingZeros = true
if (even) dmIsTrailingZeros = mmShift == 1
else dp -= 1
} else if (q < 31) dvIsTrailingZeros = multiplePowOf2(mv, q - 1)
} else if (q < 31) dvIsTrailingZeros = multiplePowOf2(mv, q)
}
len = offset(dp)
exp += len
Expand Down Expand Up @@ -1876,7 +1876,7 @@ final class JsonWriter private[jsoniter_scala](
dvIsTrailingZeros = true
if (even) dmIsTrailingZeros = mmShift == 1
else dp -= 1
} else if (q < 63) dvIsTrailingZeros = multiplePowOf2(mv, q - 1)
} else if (q < 63) dvIsTrailingZeros = multiplePowOf2(mv, q)
}
len = offset(dp)
exp += len
Expand Down

0 comments on commit 2920ef7

Please sign in to comment.