[Bug 28422] scanf family of functions provides only 7 digits of precision for converting doubles and long doubles

wine-bugs at winehq.org wine-bugs at winehq.org
Wed Oct 19 11:53:54 CDT 2011


http://bugs.winehq.org/show_bug.cgi?id=28422

--- Comment #4 from Dan Kegel <dank at kegel.com> 2011-10-19 11:53:54 CDT ---
msvcrt/tests/string.ok might show this bug, but only under valgrind?

The failing test is:
static inline BOOL almost_equal(double d1, double d2) {
    if(d1-d2>-1e-30 && d1-d2<1e-30)
        return TRUE;
    return FALSE;
}
d = strtod("0.1d238", NULL);
ok(almost_equal(d, 0.1e238L), "d = %lf\n", d);

The failure log is:
string.c:1301: Test failed: d =
1000000000000000482416141386308708571867933472627945326741491900144172904106310050588962644037102476595408159456210748972770600252972845262058045244417464426905986489749230528825980973749133650163621397243851020732242333839884529407361024.000000^M

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list