How to portably find out min(INT_MAX, abs(INT_MIN))?
While the typical value of INT_MIN is -2147483648, and the typical value of INT_MAX is 2147483647, it is not guaranteed by the standard. TL;DR: The value you’re searching for is INT_MAX in a conforming implementation. But calculating min(INT_MAX, abs(INT_MIN)) isn’t portable. The possible values of INT_MIN and INT_MAX INT_MIN and INT_MAX are defined by the … Read more