#47509 [Opn->Fbk]: Round problem

From: Date: Sun, 01 Mar 2009 01:15:43 +0000
Subject: #47509 [Opn->Fbk]: Round problem
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-134291@lists.php.net to get a copy of this message
 ID:               47509
 Updated by:       kalle@php.net
 Reported By:      home dot mail at inbox dot ru
-Status:           Open
+Status:           Feedback
 Bug Type:         Math related
 Operating System: Win
 PHP Version:      5.2.8
 New Comment:

Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.


Please describe the issue you are experincing abit better


Previous Comments:
------------------------------------------------------------------------

[2009-02-26 11:32:56] home dot mail at inbox dot ru

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 this bug report at http://bugs.php.net/?id=47509&edit=1



Thread (2 messages)

« previous php.bugs (#134291) next »