Re: [PHP-DEV] bug in zend_multiply.h

2004-03-13 Thread Ard Biesheuvel
Andi Gutmans wrote: Can you run this by Sascha <[EMAIL PROTECTED]> who wrote this code? I sent him a message but he never responded. -- Ard Thanks, Andi At 04:50 PM 3/9/2004 +0100, Ard Biesheuvel wrote: This code fails on 64-bit archs because it relies on the accuracy of a double to be s

[PHP-DEV] bug in zend_multiply.h

2004-03-09 Thread Ard Biesheuvel
This code fails on 64-bit archs because it relies on the accuracy of a double to be sufficient to represent LONG_MAX. The patch adresses it by checking for overflow by reversing the calculation instead of casting to a double and back to long. #include "build/php5-cvs/Zend/zend_multiply.h" #def