note 68050 added to function.round

From: Date: Tue, 11 Jul 2006 17:48:54 +0000
Subject: note 68050 added to function.round
Groups: php.notes 
Request: Send a blank email to php-notes+get-114674@lists.php.net to get a copy of this message
Since everybody here seems to be occupied wanking over their selfmade round() functions, a little note about the actual php-implementation: If you round() a _very_ small number to a reasonable number of decimals, it will retain its sign! IE: round(1.4 - 1.4, 4) returns "-0" instead of just "0"! Dont ask me how to properly get rid of this. Im just gonna cut it off using preg_replace(). ---- Server IP: 212.124.37.9 Probable Submitter: 84.61.1.243 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.round.php Edit -- http://master.php.net/note/edit/68050 Del: integrated -- http://master.php.net/note/delete/68050/integrated Del: useless -- http://master.php.net/note/delete/68050/useless Del: bad code -- http://master.php.net/note/delete/68050/bad+code Del: spam -- http://master.php.net/note/delete/68050/spam Del: non-english -- http://master.php.net/note/delete/68050/non-english Del: in docs -- http://master.php.net/note/delete/68050/in+docs Del: other reasons-- http://master.php.net/note/delete/68050 Reject -- http://master.php.net/note/reject/68050 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#114674) next »