diff --git a/src/int.cr b/src/int.cr index 6ccf5862eec5..669f4075de72 100644 --- a/src/int.cr +++ b/src/int.cr @@ -1040,9 +1040,8 @@ struct Int64 end struct Int128 - # TODO: eventually update to literals once UInt128 bit support is finished - MIN = new(1) << 127 - MAX = ~MIN + MIN = -170141183460469231731687303715884105728_i128 + MAX = 170141183460469231731687303715884105727_i128 # Returns an `Int128` by invoking `to_i128` on *value*. # See `String#to_i` for more details. @@ -1070,8 +1069,7 @@ struct Int128 Number.expand_div [Float64], Float64 def - - # TODO: use 0_i128 - self - Int128.new(0) - self + 0_i128 - self end def popcount @@ -1313,9 +1311,8 @@ struct UInt64 end struct UInt128 - # TODO: eventually update to literals once UInt128 bit support is finished - MIN = new 0 - MAX = ~MIN + MIN = 0_u128 + MAX = 340282366920938463463374607431768211455_u128 # Returns an `UInt128` by invoking `to_u128` on *value*. # See `String#to_i` for more details.