From 0a7e06306a36028e77f81abe0768bcfdcdf687f5 Mon Sep 17 00:00:00 2001 From: Jacob Quinn Date: Sat, 10 Aug 2019 12:08:45 -0600 Subject: [PATCH] Fixes --- base/ryu/utils.jl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/base/ryu/utils.jl b/base/ryu/utils.jl index f50d1f227abdf..1aeeb5296929c 100644 --- a/base/ryu/utils.jl +++ b/base/ryu/utils.jl @@ -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 @@ -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 @@ -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