Closed sostock closed 5 years ago
One cannot create a SafeUInt from a SafeUInt if the value is greater than typemax(SafeUInt)/2:
SafeUInt
typemax(SafeUInt)/2
julia> SafeUInt(typemax(SafeUInt)) ERROR: InexactError: check_top_bit(UInt64, 18446744073709551615)
The same happens for the other SafeUnsigned types:
SafeUnsigned
julia> SafeUInt8(SafeUInt8(127)) 127 julia> SafeUInt8(SafeUInt8(128)) ERROR: InexactError: check_top_bit(UInt8, 128)
ok, thank you; on it
fixed in master -- merge pending
One cannot create a
SafeUInt
from aSafeUInt
if the value is greater thantypemax(SafeUInt)/2
:The same happens for the other
SafeUnsigned
types: