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

Reply via email to