At 23:49 22/02/2004 +0100, Michael Walter wrote: No, -2147483648 is the lower bound and 2147483647 is the upper bound for
No, it's implementation-defined though if one of the operands is negative, IIRC.signed integers.
-2147483648 = 10000000000000000000000000000000 2147483647 = 01111111111111111111111111111111
it still doesn't explain the FPE here. What does explain it is that -2147483648 / -1 = 2147483648 which is too large.
Doesn't the rval in modulus need to be unsigned?
I checked the standard (not very thoroughly I admit) and it seems to only be undefined for 0.
We can check for this special case or work around it like Derick did (i.e. take the abs()) but why should we?
Can someone check this on a non-intel CPU with a 32bit int?
Andi
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php