#22802 [NEW]: rounding not working

From: Date: Thu, 20 Mar 2003 10:25:26 +0000
Subject: #22802 [NEW]: rounding not working
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-36025@lists.php.net to get a copy of this message
From: php at ken dot guest dot cx Operating system: FreeBSD PHP version: 4.3.0 PHP Bug Type: *Math Functions Bug description: rounding not working 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 bug report at http://bugs.php.net/?id=22802&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=22802&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=22802&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=22802&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=22802&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=22802&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=22802&r=support Expected behavior: http://bugs.php.net/fix.php?id=22802&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=22802&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=22802&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=22802&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22802&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=22802&r=dst IIS Stability: http://bugs.php.net/fix.php?id=22802&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=22802&r=gnused

« previous php.bugs (#36025) next »