Re: Re: PHP 4.0 Bug #5810 Updated: Arithmetic Operator %

From: Date: Thu, 27 Jul 2000 10:51:43 +0000
Subject: Re: Re: PHP 4.0 Bug #5810 Updated: Arithmetic Operator %
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-26457@lists.php.net to get a copy of this message
SM>> VS>> echo 0x80000000%0x2; SM>> VS>> echo 0x80000001%0x2; SM>> VS>> echo 0x80000002%0x2; SM>> VS>> echo 0x80000003%0x2; SM>> VS>> echo 0x80000080%0x100; SM>> SM>> Ah. 0x numbers currently don't work good. That's a real bug, not in %. It SM>> is known, just needs to be fixed. Seems that it is much worse bug. PHP doesn't handle numbers more than 0x7FFFFFFFF very well (read: mishandles it on every integer conversion). This is somehow linked to double->integer conversion. Does anybody know how (and if) I can convert double to long without result being a total mess? this: a = (long) b; doesn't work once b is more than 0x7FFFFFFFF. At least C compiler generates very strange code which leads to very weird results (like, b being 3266821367 (0xC2B7BCF7), a becomes -2147483648 (0x80000000). Anybody knows something about this and how to to it right? -- Stanislav Malyshev stas@zend.com +972-3-6139665 ext.106

« previous php.dev (#26457) next »