ID: 14402
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: Math related
Old Operating System: slack 7.1
Operating System: Linux-2.4.14 (Slackware 8.0)
Old PHP Version: 4.1.0
PHP Version: 4.1.0RC5
New Comment:

Changed distro/php version for clarity.

Previous Comments:
------------------------------------------------------------------------

[2001-12-10 09:47:24] [EMAIL PROTECTED]

<?
$int = 0.293847289472983; 
echo $int ."\n"; 
echo round($int,2) . "\n"; 
echo round((int)$int,2) . "\n"; 
echo round((float)$int,2) . "\n"; 
echo round((double)$int,2) . "\n"; 
?>
outputs on php 4.0.6: 
0.29384728947298 
0.29 
0 
0.29 
0.29 

however, using php 4.1.0, it outputs: 
0.29384728947298299761570206101168878376483917236328125 
0.289999999999999980015985556747182272374629974365234375 
0 
0.289999999999999980015985556747182272374629974365234375 
0.289999999999999980015985556747182272374629974365234375 

is this a bug, or a new 'feature' ? Closest report I found was 
http://marc.theaimsgroup.com/?l=php-dev&m=100750316722784&w=2 on the php-dev 
mailinglist.

------------------------------------------------------------------------



Edit this bug report at http://bugs.php.net/?id=14402&edit=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]

Reply via email to