| ... | @@ -995,7 +995,7 @@ pub const Const = struct { | ... | @@ -995,7 +995,7 @@ pub const Const = struct { |
| 995 | /// TODO See if we can make this exact. | 995 | /// TODO See if we can make this exact. |
| 996 | pub fn sizeInBaseUpperBound(self: Const, base: usize) usize { | 996 | pub fn sizeInBaseUpperBound(self: Const, base: usize) usize { |
| 997 | const bit_count = @as(usize, @boolToInt(!self.positive)) + self.bitCountAbs(); | 997 | const bit_count = @as(usize, @boolToInt(!self.positive)) + self.bitCountAbs(); |
| 998 | return (bit_count / math.log2(base)) + 1; | 998 | return (bit_count / math.log2(base)) + 2; |
| 999 | } | 999 | } |
| 1000 | | 1000 | |
| 1001 | pub const ConvertError = error{ | 1001 | pub const ConvertError = error{ |