note 90421 added to function.round

From: Date: Tue, 21 Apr 2009 20:11:28 +0000
Subject: note 90421 added to function.round
Groups: php.notes 
Request: Send a blank email to php-notes+get-153553@lists.php.net to get a copy of this message
The concern of Tim Shaw and others on trouble in rounding floating point numbers seems misplaced. I am not persuaded that money is better represented with integers than with floats. Why round? Keep all your precision, even fractions of a cent. Formatting your output is what printf() is for. (See sprintf() Example #8.) Problem solved? No problem to begin with. ---- Server IP: 208.69.120.35 Probable Submitter: 198.145.79.85 ---- Manual Page -- http://www.php.net/manual/en/function.round.php Edit -- https://master.php.net/note/edit/90421 Del: integrated -- https://master.php.net/note/delete/90421/integrated Del: useless -- https://master.php.net/note/delete/90421/useless Del: bad code -- https://master.php.net/note/delete/90421/bad+code Del: spam -- https://master.php.net/note/delete/90421/spam Del: non-english -- https://master.php.net/note/delete/90421/non-english Del: in docs -- https://master.php.net/note/delete/90421/in+docs Del: other reasons-- https://master.php.net/note/delete/90421 Reject -- https://master.php.net/note/reject/90421 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#153553) next »