Scaling Big Ints? Rounding?

The problem is that decimal literals only have Float64 precision. If you’re trying to scale a BigFloat, use a big"" literal. You could also do something like this:

julia> rescale(v, n) = big(v) / exp10(n)
rescale (generic function with 1 method)

julia> rescale(0x5781f15b552ec5c60b, 18)
1614.230099934426023435000000000000000000000000000000000000000000000000000000008
2 Likes