Mantis Bugtracker
  

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0003469 [Quercus] major always 04-29-09 19:46 04-30-09 15:45
Reporter pablorg View Status public  
Assigned To
Priority normal Resolution open Platform
Status new   OS
Projection none   OS Version
ETA none Fixed in Version Product Version 3.2.1
  Product Build
Summary 0003469: quercus float/rounding bug
Description I have a report that accumulates odometer values it pulls from the db. You can see in the image it does some funky math while interpreting this code:

    while($rs->moveNext())
    {
      $vehId = $rs->fields['veh_id'];
      
      if ($showSummary)
      {
        if (!isset($odomCache[$vehId]))
          $odomCache[$vehId] = 0;
        $odomCache[$vehId] += $rs->fields['distance_from_last'];
        $rs->fields['odom'] = $odomCache[$vehId];
      }
    }

I've put the list of values below.

Steps To Reproduce
Additional Information  distance_from_last
--------------------
                  0
                  0
                0.1
                0.1
                0.7
                0.6
                  0
                1.5
                  0
                4.8
                0.4
                  0
                0.5
                0.5
                0.3
                4.3
Attached Files  quercus-rounding.gif [^] (11,079 bytes) 04-29-09 19:46
 php-rounding.gif [^] (10,371 bytes) 04-29-09 19:47

- Relationships

- Notes
(0003970)
pablorg
04-29-09 19:48

note the two image files are mis-named -rounding. In reality, there should not need to be any rounding.
 
(0003971)
nam
04-30-09 11:03

Can you try the Resin 4.0 snapshot at: http://www.caucho.com/download [^]

We had made our float rounding to be more like PHP.
 
(0003976)
pablorg
04-30-09 15:45

I tried resin 4, but I cant even log into the app b/c it wont connect to db. See bug: http://bugs.caucho.com/view.php?id=3471 [^]
 

- Issue History
Date Modified Username Field Change
04-29-09 19:46 pablorg New Issue
04-29-09 19:46 pablorg File Added: quercus-rounding.gif
04-29-09 19:47 pablorg File Added: php-rounding.gif
04-29-09 19:48 pablorg Note Added: 0003970
04-30-09 11:03 nam Note Added: 0003971
04-30-09 15:45 pablorg Note Added: 0003976


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
35 total queries executed.
28 unique queries executed.
Powered by Mantis Bugtracker