@@ -1791,7 +1791,7 @@ final class JsonWriter private[jsoniter_scala](
1791
1791
lastPos += digitCount(q)
1792
1792
pos = lastPos
1793
1793
} else {
1794
- q = ((hours >>> 8 ) * 2.56e-6 ).toInt
1794
+ q = ((hours >>> 8 ) * 2.56e-6 ).toInt // divide a medium positive long by 100000000
1795
1795
lastPos += digitCount(q)
1796
1796
pos = write8Digits((hours - q * 100000000L ).toInt, lastPos, buf, ds)
1797
1797
}
@@ -2210,7 +2210,7 @@ final class JsonWriter private[jsoniter_scala](
2210
2210
}
2211
2211
2212
2212
private [this ] def write18Digits (x : Long , pos : Int , buf : Array [Byte ], ds : Array [Short ]): Int = {
2213
- val q1 = ((x >>> 8 ) * 2.56e-6 ).toLong
2213
+ val q1 = ((x >>> 8 ) * 2.56e-6 ).toLong // divide a medium positive long by 100000000
2214
2214
write8Digits((x - q1 * 100000000L ).toInt, {
2215
2215
val q2 = (q1 >>> 8 ) * 1441151881L >>> 49 // divide a small positive long by 100000000
2216
2216
write8Digits((q1 - q2 * 100000000L ).toInt, write2Digits(q2.toInt, pos, buf, ds), buf, ds)
@@ -2306,7 +2306,7 @@ final class JsonWriter private[jsoniter_scala](
2306
2306
buf(pos + 18 ) = (r + '0' ).toByte
2307
2307
posCorr = 1
2308
2308
}
2309
- val q1 = ((q0 >>> 8 ) * 2.56e-6 ).toLong // divide a positive long by 100000000
2309
+ val q1 = ((q0 >>> 8 ) * 2.56e-6 ).toLong // divide a medium positive long by 100000000
2310
2310
q = q1.toInt
2311
2311
if (q1 == q) {
2312
2312
lastPos += digitCount(q)
@@ -2609,7 +2609,7 @@ final class JsonWriter private[jsoniter_scala](
2609
2609
var pos = p
2610
2610
var posLim = pl
2611
2611
if (q0 != x) {
2612
- val q1 = ((x >>> 8 ) * 2.56e-6 ).toInt // divide a positive long by 100000000
2612
+ val q1 = ((x >>> 8 ) * 2.56e-6 ).toInt // divide a medium positive long by 100000000
2613
2613
val r1 = (x - q1 * 100000000L ).toInt
2614
2614
val posm8 = pos - 8
2615
2615
if (r1 == 0 ) {
0 commit comments