note 81825 added to function.round
| From: | timpleasenospamshaw at mailnospam dot usa dot com | Date: | Fri, 14 Mar 2008 17:38:44 +0000 |
| Subject: | note 81825 added to function.round | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-137071@lists.php.net to get a copy of this message | ||
After reading all of the notes for this page, I suggest that any casual PHP coder beware. Please
consult someone with an actual understanding of floating point issues before developing a serious
application, such as one dealing with money in any form.
Also, in the note I just posted, I suggested using integers for monetary values. PHP does not
currently support 64 bit integers on platforms where int is normally 32 bits, so watch out for
overflow occuring near $2 million or $20 million, depending on whether the integers represent mils
or cents. I believe it may be possible for PHP to give an incorrect result without an error
condition for some integer overflow conditions.
Again, please see
http://www.php.net/float
----
Server IP: 209.41.74.194
Probable Submitter: 66.214.49.84
----
Manual Page -- http://www.php.net/manual/en/function.round.php
Edit -- https://master.php.net/note/edit/81825
Del: integrated -- https://master.php.net/note/delete/81825/integrated
Del: useless -- https://master.php.net/note/delete/81825/useless
Del: bad code -- https://master.php.net/note/delete/81825/bad+code
Del: spam -- https://master.php.net/note/delete/81825/spam
Del: non-english -- https://master.php.net/note/delete/81825/non-english
Del: in docs -- https://master.php.net/note/delete/81825/in+docs
Del: other reasons-- https://master.php.net/note/delete/81825
Reject -- https://master.php.net/note/reject/81825
Search -- https://master.php.net/manage/user-notes.php