Date: 07/13/01
- Next message: Paul Rees: "[PHP-DEV] Re: Bug #12153 Updated: Failure to find libraries"
- Previous message: ken.gregg <email protected>: "[PHP-DEV] Bug #12154: GP Fault in Kernel32 if buffer too small in fgetcsv()"
- Next in thread: yaragn <email protected>: "[PHP-DEV] Bug #12155 Updated: modulus %"
- Reply: yaragn <email protected>: "[PHP-DEV] Bug #12155 Updated: modulus %"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
From: yaragn <email protected>
Operating system: linux 2.4.3
PHP version: 4.0.5
PHP Bug Type: Math related
Bug description: modulus %
Appears to be broken on large(r) integers. Is this a limitation on the type
used? (I am coding working ip2long/long2ip).
$temp = 3194548456;
print "correct: " . ($temp - 255*floor($temp/255));
print "php: " . $temp % 255 . "<br>";
as defined in maths, the % is equiv to MOD(n, d) = n - d*INT(n/d)
where n is the number, d is the divisor.
-- Edit bug report at: http://bugs.php.net/?id=12155&edit=1-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Paul Rees: "[PHP-DEV] Re: Bug #12153 Updated: Failure to find libraries"
- Previous message: ken.gregg <email protected>: "[PHP-DEV] Bug #12154: GP Fault in Kernel32 if buffer too small in fgetcsv()"
- Next in thread: yaragn <email protected>: "[PHP-DEV] Bug #12155 Updated: modulus %"
- Reply: yaragn <email protected>: "[PHP-DEV] Bug #12155 Updated: modulus %"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

