Arithmetic coding/As a generalized change of radix: Difference between revisions
Content added Content deleted
m (handle a rare case) |
|||
Line 783: | Line 783: | ||
z = Int(floor(log10(high - low))) |
z = Int(floor(log10(high - low))) |
||
if z == 0 |
if z == 0 |
||
return low, 0 |
return string(low), 0 |
||
end |
end |
||
if low <= parse(BigInt, string(high)[1:end- z - 1] * "0"^(z + 1)) <= high |
if low <= parse(BigInt, string(high)[1:end- z - 1] * "0"^(z + 1)) <= high |