On 17 Jul 2014, at 10:24, Nikita Popov <nikita....@gmail.com> wrote:
> This is already what is currently happening, see > http://lxr.php.net/xref/PHP_TRUNK/Zend/zend_operators.c#1067. > > Andreas proposal is only useful in the case that the numbers don't divide > exactly and you need round-down/truncation behavior and your numbers are in > a range where the indirection through double arithmetic results in > precision loss. It’s still useful regardless as it saves you implementing it in terms of floats. I mean, you can implement a right shift (rarely used outside bit masks) in terms of multiplication and exponentiation, but that doesn’t mean you shouldn’t have a right shift. -- Andrea Faulds http://ajf.me/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php