Re: Integer subtraction problem, help!
bruce.james.lee @gmail.com wrote in news:1112571648 .404827.293590
@f14g2000cwb.go oglegroups.com:
dot@dot.dot wrote in news:geu051p9sl vauaj27vrohefv1 1sos1qb8c@4ax.c om:
[color=blue]
> Also look in your headers, if you have a limits.h header, it should
> provide a constant INT_MIN which will be the lowest legal value for
> your compiler. Use it instead of trying to define a new one...
>
> Yes, they are 32 bits. So, I calculated -2^31 as the minimum possible
> number.
>
> I just saw the header file you mentioned, it reads
>
> #define INT32_MIN (-2147483647-1)[/color]
The recommendation was to check the value of INT_MIN, not INT32_MIN.
INT_MIN should be in limits.h.
Sinan
--
A. Sinan Unur <1usa@llenroc.u de.invalid>
(reverse each component and remove .invalid for email address)
bruce.james.lee @gmail.com wrote in news:1112571648 .404827.293590
@f14g2000cwb.go oglegroups.com:
dot@dot.dot wrote in news:geu051p9sl vauaj27vrohefv1 1sos1qb8c@4ax.c om:
[color=blue]
> Also look in your headers, if you have a limits.h header, it should
> provide a constant INT_MIN which will be the lowest legal value for
> your compiler. Use it instead of trying to define a new one...
>
> Yes, they are 32 bits. So, I calculated -2^31 as the minimum possible
> number.
>
> I just saw the header file you mentioned, it reads
>
> #define INT32_MIN (-2147483647-1)[/color]
The recommendation was to check the value of INT_MIN, not INT32_MIN.
INT_MIN should be in limits.h.
Sinan
--
A. Sinan Unur <1usa@llenroc.u de.invalid>
(reverse each component and remove .invalid for email address)
Comment