note 27299 added to function.round
| From: | php-general at lists dot php dot net | Date: | Sun, 01 Dec 2002 06:22:26 +0000 |
| Subject: | note 27299 added to function.round | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-40201@lists.php.net to get a copy of this message | ||
<pre>
<?php
for ($v=1.5, $y=2; $v<=3276746.5; $v++, $y++)
{
$x = round($v);
if ($x!=$y)
echo $x . "\n";
};
echo "complete.\n";
$asdf = round(2.45001);
if ($asdf==2)
echo "people are dumb. php rounds correctly.\n";
?>
</pre>
outputs:
complete.
people are dumb. php rounds correctly.
--
http://www.php.net/manual/en/function.round.php
http://master.php.net/manage/user-notes.php?action=edit+27299
http://master.php.net/manage/user-notes.php?action=delete+27299
http://master.php.net/manage/user-notes.php?action=reject+27299