From:             home dot mail at inbox dot ru
Operating system: Win
PHP version:      5.2.8
PHP Bug Type:     Math related
Bug description:  Round problem

Description:
------------
why round() return illegal result?

Reproduce code:
---------------
while($row = odbc_fetch_array($q)){
    extract($row);
    print_r($row);
        var_dump($ISHSALDO);
    echo round($ISHSALDO, 2);
        echo "\n";
}

Expected result:
----------------
Array
(
[NAM] =>
[GOR] =>
[V_KUL] => ø
[ULL] =>
[DOM] =>
[IDM] =>
[KVR] =>
[DOG] => 1998
[ISHSALDO] => 290.000
[NACH] => 295.000
[OPLATA] => 290.000
[TEL] => 0000000
)
string(7) "290.000"
290

Actual result:
--------------
Array
(
[NAM] =>
[GOR] =>
[V_KUL] => ø
[ULL] =>
[DOM] =>
[IDM] =>
[KVR] =>
[DOG] => 1998
[ISHSALDO] => 290.000
[NACH] => 295.000
[OPLATA] => 290.000
[TEL] => 0000000
)
string(7) "290.000"
28:

-- 
Edit bug report at http://bugs.php.net/?id=47509&edit=1
-- 
Try a CVS snapshot (PHP 5.2):        
http://bugs.php.net/fix.php?id=47509&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):        
http://bugs.php.net/fix.php?id=47509&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):        
http://bugs.php.net/fix.php?id=47509&r=trysnapshot60
Fixed in CVS:                        
http://bugs.php.net/fix.php?id=47509&r=fixedcvs
Fixed in CVS and need be documented: 
http://bugs.php.net/fix.php?id=47509&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=47509&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=47509&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=47509&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=47509&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=47509&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=47509&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=47509&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=47509&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=47509&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=47509&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=47509&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=47509&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=47509&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=47509&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=47509&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=47509&r=mysqlcfg

Reply via email to