ID: 11435 Comment by: blow-job652 at hotmail dot com Reported By: tem at iocus dot com Status: Bogus Bug Type: Variables related Operating System: Linux (Mandrake & Redhat) PHP Version: 4.0 Latest CVS (2001-06-12) New Comment:
<a href=http://successshavedlatexb.da.ru>blow job</a> Previous Comments: ------------------------------------------------------------------------ [2001-06-12 13:23:10] [EMAIL PROTECTED] The famous rounding issue. By using 'f' (float) would give you correct result. Not a bug. --Jani ------------------------------------------------------------------------ [2001-06-12 09:23:30] tem at iocus dot com <?php $test="2.03"; $amount=($test*100); echo $amount . "\n"; printf("%06d\n",$amount); $amount=(2.03*100); printf("%06d\n",$amount); ?> Produces the following output: 203 000202 000202 My math is a little fuzzy but I think 2.03 * 100 = 203. This used to work in php 3.x but seems to be broken since the 4.x beta. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=11435&edit=1
