Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
quinnj committed Aug 10, 2019
1 parent 0a2c30e commit 0a7e063
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions base/ryu/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ end
return pos + i
end

@inline function append_d_digits(olength, digits, buf, pos)
@inline function append_d_digits(olength, digits, buf, pos, decchar)
i = 0
while digits >= 10000
c = digits % 10000
Expand All @@ -234,12 +234,12 @@ end
if digits >= 10
c = digits << 1
buf[pos] = DIGIT_TABLE[c + 1]
buf[pos + 1] = UInt8('.')
buf[pos + 1] = decchar
buf[pos + 2] = DIGIT_TABLE[c + 2]
i += 3
else
buf[pos] = UInt8('0') + digits
buf[pos + 1] = UInt8('.')
buf[pos + 1] = decchar
i += 2
end
return pos + i
Expand Down Expand Up @@ -287,7 +287,7 @@ const BIG_MASK = (big(1) << 64) - 1

const POW10_SPLIT = collect(Iterators.flatten(map(0:63) do idx
pow10bits = pow10bitsforindex(idx)
map(0:lengthforindex(idx) - 1) do i
map(0:lengthforindex(idx)-1) do i
v = (div(big(1) << pow10bits, big(10)^(9 * i)) + 1) % ((big(10)^9) << 136)
return (UInt64(v & BIG_MASK), UInt64((v >> 64) & BIG_MASK), UInt64((v >> 128) & BIG_MASK))
end
Expand Down

0 comments on commit 0a7e063

Please sign in to comment.