On 20 Aug 2014, at 06:52, Dmitry Stogov <dmi...@zend.com> wrote:

> 1) INF conversion to zero seems wrong. May be +INF should be converted to 
> MAX_LONG and -INF to MIN_LONG?

I think of Infinity as more of an error value than an actual number. Not using 
MAX_LONG and MIN_LONG means it casts to the same value matter how large the 
integer type is, and it happens to be what JavaScript casts Infinity to. 
There’s also the fringe benefit that 1/0’s result in PHP, FALSE, casts to zero, 
as Infinity now would also, which is the standard IEEE 754 result for 1/0.

> 3) a bit unrelated, but it also may make sense to introduce a logical right 
> shift operator (>>> in Java)

How would that function?
--
Andrea Faulds
http://ajf.me/





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

Reply via email to