note 47523 added to function.floor
| From: | paradoxheart at anime-sakura dot org dot uk | Date: | Fri, 19 Nov 2004 00:50:16 +0000 |
| Subject: | note 47523 added to function.floor | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-80730@lists.php.net to get a copy of this message | ||
Unfortunately, converting to a string does not completely eliminate the price problem.
If, for example, our calculation actually yielded the result 79.9899999999999 then naturally
we'd want the floor function to return 79.98, but instead it will return 79.99 if you use the
string conversion approach.
----
Manual Page -- http://www.php.net/manual/en/function.floor.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+47523
Delete -- http://master.php.net/manage/user-notes.php?action=delete+47523&report=yes
Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+47523&report=yes&reason=bad+code
Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+47523&report=yes&reason=spam
Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+47523&report=yes&reason=useless+example
Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+47523&report=yes&reason=contains+commercial+links
Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+47523&report=yes&reason=useless+note
Reject -- http://master.php.net/manage/user-notes.php?action=reject+47523&report=yes
Search -- http://master.php.net/manage/user-notes.php