Re: Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_operators.c
| From: | Derick Rethans | Date: | Sun, 22 Feb 2004 21:29:00 +0000 |
| Subject: | Re: Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_operators.c | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-8062@lists.php.net to get a copy of this message | ||
On Sun, 22 Feb 2004, Michael Spector wrote:
> On Sun, 22 Feb 2004, Derick Rethans wrote:
>
> > On Sun, 22 Feb 2004, Derick Rethans wrote:
> >
> > > On Sun, 22 Feb 2004, Andi Gutmans wrote:
> > >
> > > > Huh? What platform crashes? Can you send reproducible C code?
> > >
> > > int main(void) {
> > > long a = -2147483648;
> > > long b = -1;
> > > long c;
> > >
> > > c = a % b;
> > > }
> >
> > Does anybody has a clue *why* this gives a floating point error btw?
> >
>
> May be because modulo is defined only for positive b ?
No, it works fine for -2, only the two mentioned numbers cause a FPE.
Derick