Returns the negation of the integer parameter. Result is a signed integer.
pub fn negateCast(x: anytype) !@Int(.signed, @bitSizeOf(@TypeOf(x)))
pub fn negateCast(x: anytype) !@Int(.signed, @bitSizeOf(@TypeOf(x))) {
if (@typeInfo(@TypeOf(x)).int.signedness == .signed) return negate(x);
const int = @Int(.signed, @bitSizeOf(@TypeOf(x)));
if (x > -minInt(int)) return error.Overflow;
if (x == -minInt(int)) return minInt(int);
return -@as(int, @intCast(x));
}