PHP 4.0 Bug #6851: "floor()" function rounds down an integer that resulted from a division

From: Date: Fri, 22 Sep 2000 08:22:19 +0000
Subject: PHP 4.0 Bug #6851: "floor()" function rounds down an integer that resulted from a division
Groups: php.dev 
Request: Send a blank email to php-dev+get-33523@lists.php.net to get a copy of this message
From: virtual.spirit@digi.com.br 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

« previous php.dev (#33523) next »