I think 0x8000000000000000_i64 should evaluate to -9223372036854775808. It seems like it does not check for sign and then fails because the max is positive number is 9223372036854775807.
First sentence makes no sense to me already.
0x80000000_i32
Error: 2147483648 doesn't fit in an Int32
@wontruefree Number literals use regular math notation, not a binary data format. See https://forum.crystal-lang.org/t/negative-numbers-in-binary-and-hexa/1062/5?u=straight-shoota for the difference.
@straight-shoota that makes sense. I was working on a c port and that is treated a little different.
Most helpful comment
@wontruefree Number literals use regular math notation, not a binary data format. See https://forum.crystal-lang.org/t/negative-numbers-in-binary-and-hexa/1062/5?u=straight-shoota for the difference.