fn signedRemainder(numerator: anytype, denominator: anytype) @TypeOf(numerator, denominator)

C % operator for signed integers C standard states: “If the quotient a/b is representable, the expression (a/b)*b + a%b shall equal a” The quotient is not representable if denominator is zero, or if numerator is the minimum integer for the type and denominator is -1. C has undefined behavior for those two cases; this function has safety checked undefined behavior

Parameters

numerator: anytype,
denominator: anytype,