After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 403758 - floating number not parsed correctly.
floating number not parsed correctly.
Status: RESOLVED DUPLICATE of bug 306823
Product: libcroco
Classification: Core
Component: General
0.5
Other All
: Normal normal
: ---
Assigned To: libcroco maintainers
libcroco maintainers
Depends on:
Blocks:
 
 
Reported: 2007-02-02 22:58 UTC by Chen
Modified: 2007-02-14 20:28 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Chen 2007-02-02 22:58:34 UTC
Please describe the problem:
Floating point number with ".1" after the decimal points (e.g., "1.1"), are not parsed correctly. The value returned is "2" instead. We trace it down to this function:

gdouble
cr_utils_n_to_0_dot_n (glong a_n)
{
        gdouble result = a_n;
      
        while (ABS (result) > 1) {
                result = result / 10;
        }
 
        return result;
}

For the value "1.1" example, "1" is passed into this function and the function shall return ".1". But its logic returns "1" instead. That is wrong.

Steps to reproduce:
1. parse a css rule "body {font-size: 1.1em}" .
2. Output it, you will get "2em".
3. 


Actual results:


Expected results:
expect body {font-size: 1.1em}" 

Does this happen every time?
yes

Other information:
Comment 1 Dominic Lachowicz 2007-02-14 20:28:16 UTC

*** This bug has been marked as a duplicate of 306823 ***