Date: 07/13/01
- Next message: craig <email protected>: "[PHP-DEV] Bug #12158: EVAL code not working correctly if IF block"
- Previous message: eschmitt <email protected>: "[PHP-DEV] Bug #12157: copying a single quote from MS word causes form variable to disappear."
- In reply to: yaragn <email protected>: "[PHP-DEV] Bug #12155: modulus %"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
ID: 12155
User updated by: yaragn <email protected>
Reported By: yaragn <email protected>
Old Status: Open
Status: Closed
Bug Type: Math related
Operating System: linux 2.4.3
PHP Version: 4.0.5
New Comment:
Integer limited to 2047000000 so there.
Previous Comments:
------------------------------------------------------------------------
[2001-07-13 18:29:23] yaragn <email protected>
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 this 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: craig <email protected>: "[PHP-DEV] Bug #12158: EVAL code not working correctly if IF block"
- Previous message: eschmitt <email protected>: "[PHP-DEV] Bug #12157: copying a single quote from MS word causes form variable to disappear."
- In reply to: yaragn <email protected>: "[PHP-DEV] Bug #12155: modulus %"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

