note 50708 added to function.round
| From: | cosmosonur at yahoo dot com | Date: | Mon, 07 Mar 2005 23:05:18 +0000 |
| Subject: | note 50708 added to function.round | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-86073@lists.php.net to get a copy of this message | ||
this one;
$a=0.0401;
$b=250;
$c=($a*$b);
$d=round($c,2);
echo $d;
---------------
display: 10.02
why is not same ???
this two
$a=401;
$b=250;
$c=$a*$b/10000;
$d=round($c,2);
echo $d;
---------------
display: 10.03
I don't understand why is not same????
----
Manual Page -- http://www.php.net/manual/en/function.round.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+50708
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+50708&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+50708&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+50708&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+50708&report=yes&reason=useless
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+50708&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+50708&report=yes
Search -- http://master.php.net/manage/user-notes.php