Re: Bug #1335 Updated: modulus operator overflows
| From: | Cam Clarke | Date: | Tue, 20 Apr 1999 21:32:02 +0000 |
| Subject: | Re: Bug #1335 Updated: modulus operator overflows | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-5161@lists.php.net to get a copy of this message | ||
It's your party and all, but the fact that:
$a % $b
returns a constant for all $a > (2^31) - 1 seems to me
like a bug no matter how you look at it. You could
throw an error, promote to double, document it as intended,
or if you're busy leave the bug open, but closing the bug and
leaving it as-is seems a disservice to the fine work you all have done.
Just my opinion,
-Cam
----- Original Message -----
From: Bug Database <php-dev@lists.php.net>
To: <cclarke@netcom.com>
Sent: Tuesday, April 20, 1999 12:37 PM
Subject: [PHP-DEV] Bug #1335 Updated: modulus operator overflows
> ID: 1335
> Updated by: andi
> Reported By: cclarke@netcom.com
> Status: Closed
> Bug Type: Misbehaving function
> Assigned To:
> Comments:
>
> PHP 3 supports the BC math library functions of arbitrary precision
operations, so you're best off using them as
> you seem to be dealing with very large numbers.
> The mod function is called bc_mod(). Check out the online man pages for
more information.
> In any case, there might be better ways of doing the built-in math
operations. It might still be a good idea to take
> a look at them, but we have to be careful not to make incompatible
changes. Some places already automatically
> use the BC math library in case the operations overflow and the BC library
is compiled into PHP
>
> Full Bug description available at: http://bugs.php.net?id=1335
>
>
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net