From: SourceForge.net <no...@so...> - 2008-05-11 14:21:06
|
Bugs item #1961893, was opened at 2008-05-11 15:21 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=1961893&group_id=2435 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: mingw runtime Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: François-Xavier Coudert (coudert) Assigned to: Nobody/Anonymous (nobody) Summary: Bug in __mingw_snprintf with "%9.0e" format Initial Comment: Take the following testcase: #include <stdio.h> extern int __mingw_snprintf (char *, size_t, const char *, ...); int main (void) { char buf[21]; __mingw_snprintf (buf, 20, "%9.0e\n", 39.); fputs (buf, stdout); snprintf (buf, 20, "%9.0e\n", 39.); fputs (buf, stdout); return 0; } Compiled and run, it gives: $ gcc u.c -W -Wall && a 3e+01 4e+001 where you can see that __mingw_snprintf() got its rounding wrong (it's the first line of output). (As an side comment, the Windows snprintf() seems to output more exponent digits than the ones I know in the Unix world, but of course that's a their problem, not mingw's.) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=1961893&group_id=2435 |