Demoting BigInt to Int64

can’t you do something like:

# a is BigInt

a = a<=typemax(Int64) ? Int64(a) : a
1 Like