On 15 Jul 2014, at 01:58, Stas Malyshev <smalys...@sugarcrm.com> wrote:

> INT_MAX is kind of an edge case,

It’s just an obvious example, integers beyond 2^53 fulfill this.

> if you need arbitrary-length precision
> you can always use gmp or bcmath.

I’m not asking for arbitrary-length precision, I’m asking for an integer 
division operator for PHP’s integer type. Granted, this function would be even 
more useful if my bigints RFC got in, but it’s useful now.

> I'm not sure this one-off use case
> that is already covered by two extensions really needs another function.

Both of those are likely not to be installed on most systems. Why do you need 
to install gmp or bcmath to do a basic operation with two 64-bit integers 
yielding a 64-bit integer? Many languages support this (C, C++, C#, Java, 
Python, to name a few). Why shouldn’t PHP?

> Practically, where would you need exact division up to 53 bits but not
> beyond?

No idea. This RFC isn’t proposing that.

--
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