note 18348 added to function.round

From: Date: Sat, 19 Jan 2002 12:04:55 +0000
Subject: note 18348 added to function.round
Groups: php.notes 
Request: Send a blank email to php-notes+get-25132@lists.php.net to get a copy of this message
No, this is a (serious) bug. If you write a financial application you can't round on a random basis! You either round conforming to the law or you loose when paying the next taxes and the tax authority notices that you do a booking from one account to two others and the sum of the bookings of the two others is lower or higher than the booking from the one account .. in consequence the balance isn't correct then and the tax authority (at least here in Germany) will estimate the tax debts which can ruin one's business and, in consequence, one's entire life. Lots of power for such a small function, eh? :-) .. btw, I don't want to flame with this posting, I just want to point out that it is really important to have a rounding function one can rely on because it can have terrible consequences if one can not. That's also why I said the above function should be used fully on one's OWN risk ONLY. - Felix Schwarz, Innovative -- http://www.php.net/manual/en/function.round.php http://master.php.net/manage/user-notes.php?action=edit+18348 http://master.php.net/manage/user-notes.php?action=delete+18348 http://master.php.net/manage/user-notes.php?action=reject+18348

« previous php.notes (#25132) next »