php-documentation-list | 2003101
Date: 10/09/03
- Next message: wonglow at yahoo dot com: "[PHP-DOC] #25802 [NEW]: User Notes inaccurate"
- Previous message: Andrey Hristov: "[PHP-DOC] cvs: phpdoc /en/reference/array/functions array-diff-uassoc.xml array-udiff-assoc.xml array-udiff-uassoc.xml array-udiff.xml"
- Next in thread: didou <email protected>: "[PHP-DOC] #25801 [Opn->Bgs]: User Notes inaccurate"
- Reply: didou <email protected>: "[PHP-DOC] #25801 [Opn->Bgs]: User Notes inaccurate"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
From: wonglow at yahoo dot com
Operating system: any
PHP version: Irrelevant
PHP Bug Type: Documentation problem
Bug description: User Notes inaccurate
Description:
------------
A note added at "http://www.php.net/manual/en/function.round.php" is
inaccurate
limit0.com
17-Aug-2003 09:58
Here is how to always round up...
$x = (a/b);
$r = round($x);
$d = ($x-$r);
if ($d>0){
$x = ($r+1);
}
.....
The result above will not always round up variable $x.
e.g If $x=0.6777
then $r = 1 and $d = -0.3223
Since $d < 0
$x is still 0.6777. It never round up ,except if $x < 0.5.
I believe ceil() is doing a good job.
-- Edit bug report at http://bugs.php.net/?id=25801&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=25801&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=25801&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=25801&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=25801&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=25801&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=25801&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=25801&r=support Expected behavior: http://bugs.php.net/fix.php?id=25801&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=25801&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=25801&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=25801&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25801&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=25801&r=dst IIS Stability: http://bugs.php.net/fix.php?id=25801&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=25801&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=25801&r=float
- Next message: wonglow at yahoo dot com: "[PHP-DOC] #25802 [NEW]: User Notes inaccurate"
- Previous message: Andrey Hristov: "[PHP-DOC] cvs: phpdoc /en/reference/array/functions array-diff-uassoc.xml array-udiff-assoc.xml array-udiff-uassoc.xml array-udiff.xml"
- Next in thread: didou <email protected>: "[PHP-DOC] #25801 [Opn->Bgs]: User Notes inaccurate"
- Reply: didou <email protected>: "[PHP-DOC] #25801 [Opn->Bgs]: User Notes inaccurate"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

