[PHP-DEV] Bug #12155 Updated: modulus %

2001-08-07 Thread jmcastagnetto

ID: 12155
Updated by: jmcastagnetto
Reported By: [EMAIL PROTECTED]
Old Status: Bogus
Status: Closed
Bug Type: Math related
Operating System: linux 2.4.3
PHP Version: 4.0.5
New Comment:

See Bug #12623 for a more complete explanation on modulus
( http://www.php.net/bugs.php?id=12623 )

Previous Comments:


[2001-08-06 19:57:53] [EMAIL PROTECTED]

float % int could lead to rounding difficulties, which is not a bug.



[2001-07-13 20:34:11] [EMAIL PROTECTED]

Integer limited to 204700 so there.



[2001-07-13 18:29:23] [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=12155edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #12155 Updated: modulus %

2001-08-07 Thread jmcastagnetto

ID: 12155
Updated by: jmcastagnetto
Reported By: [EMAIL PROTECTED]
Old Status: Closed
Status: Bogus
Bug Type: Math related
Operating System: linux 2.4.3
PHP Version: 4.0.5


Previous Comments:


[2001-08-06 19:57:53] [EMAIL PROTECTED]

float % int could lead to rounding difficulties, which is not a bug.



[2001-07-13 20:34:11] [EMAIL PROTECTED]

Integer limited to 204700 so there.



[2001-07-13 18:29:23] [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=12155edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #12155 Updated: modulus %

2001-08-06 Thread jeroen

ID: 12155
Updated by: jeroen
Reported By: [EMAIL PROTECTED]
Old Status: 
Status: Bogus
Bug Type: Math related
Operating System: linux 2.4.3
PHP Version: 4.0.5
New Comment:

float % int could lead to rounding difficulties, which is not a bug.

Previous Comments:


[2001-07-13 20:34:11] [EMAIL PROTECTED]

Integer limited to 204700 so there.



[2001-07-13 18:29:23] [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=12155edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #12155 Updated: modulus %

2001-07-13 Thread yaragn

ID: 12155
User updated by: [EMAIL PROTECTED]
Reported By: [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 204700 so there.

Previous Comments:


[2001-07-13 18:29:23] [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=12155edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]