[PHP-DEV] PHP 4.0 Bug #6851: "floor()" function rounds down an integer that resulted from a division From: virtual.spirit <email protected>
Date: 09/22/00

From: virtual.spirit <email protected>
Operating system: RedHat Linux 6.1
PHP version: 4.0.2
PHP Bug Type: Math related
Bug description: "floor()" function rounds down an integer that resulted from a division

# Script reproducing the problem:
$raw_result = (14056567/(14056567/100));
# the line below will generate error, too
# $raw_result = (140565637/(140565637/100));

$round = floor($raw_result);
echo "Raw result: $raw_result\nRounded: $round\n";

# Tested with two different PHP builds:
# ./configure --with-apxs --with-mysql --enable-ftp
# and
# ./configure --with-mysql --enable-ftp

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