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

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to