#22802 [Opn->Bgs]: rounding not working

From: Date: Thu, 20 Mar 2003 10:44:03 +0000
Subject: #22802 [Opn->Bgs]: rounding not working
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-36027@lists.php.net to get a copy of this message
ID: 22802 Updated by: hholzgra@php.net Reported By: php at ken dot guest dot cx -Status: Open +Status: Bogus Bug Type: *Math Functions Operating System: FreeBSD PHP Version: 4.3.0 New Comment: Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php you asked it to round and so it did Previous Comments: ------------------------------------------------------------------------ [2003-03-20 04:25:26] php at ken dot guest dot cx in short these should all pring 29.99. they don't: <?php $discountrate = 10; $i = 299.99/100 * $discountrate; echo "$i\n"; echo sprintf("%.2f",$i), "\n"; echo round($i, 2), "\n"; ?> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=22802&edit=1

« previous php.bugs (#36027) next »