I've searched around, but am somewhat stumped: is there any function (in 
0.3 and/or 0.4) which when passed a decimal string, will return the "best" 
signed integer type, i.e. the smallest of Int, Int64, Int128 or BigInt?

The closest I've found is parse, but this returns macro-wrapped expressions:

julia> parse(string(big(1) << 62)) # Int64, okay.

4611686018427387904


julia> parse(string(big(1) << 126)) # wanted Int128

:(@int128_str "85070591730234615865843651857942052864")


julia> parse(string(big(1) << 128)) # wanted BigInt

:(@bigint_str "340282366920938463463374607431768211456")


-Simon

Reply via email to