Re: Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_operators.c
| From: | Andi Gutmans | Date: | Sun, 22 Feb 2004 22:57:05 +0000 |
| Subject: | Re: Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_operators.c | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-8070@lists.php.net to get a copy of this message | ||
At 23:49 22/02/2004 +0100, Michael Walter wrote:
No, -2147483648 is the lower bound and 2147483647 is the upper bound for
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? AndiNo, 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?