php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #47509 Round problem
Submitted: 2009-02-26 11:32 UTC Modified: 2009-03-09 01:00 UTC
From: home dot mail at inbox dot ru Assigned:
Status: No Feedback Package: Math related
PHP Version: 5.2.8 OS: Win
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: home dot mail at inbox dot ru
New email:
PHP Version: OS:

 

 [2009-02-26 11:32 UTC] 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:

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-03-01 01:15 UTC] kalle@php.net
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
 [2009-03-09 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Mon Aug 03 21:01:24 2020 UTC