On Wed, Apr 27, 2011 at 5:42 PM, Simon de Graaf <[email protected]> wrote: > Automatic build: > > mingw-w64-bin_i686-linux_20110423.tar.bz2 > > Program code: > > #include <stdio.h> > > int main () > { > long double d = 16.125e-08; > double e = 8.125e-08; > > printf ("ge=%g (f)\n", (float)e); > printf ("ge=%g\n", e); > printf ("fe=%f (f)\n", (float)e); > printf ("fe=%f\n", e); > printf ("ee=%e\n", e); > printf ("gd=%g (d)\n", (double)d); > return 0; > } > > Compile command: > > % bin/x86_64-w64-mingw32-gcc -Wall zbla2.c -o zbla2.exe -static >
Hmm, exe from my own personal build (gcc-4.4.x + mingw-w64 release branch rev.4150) prints expectedly (I guess), like: ge=8.125e-008 (f) ge=8.125e-008 fe=0.000000 (f) fe=0.000000 ee=8.125000e-008 gd=1.6125e-007 (d) I first suspected about the mingw_printf changes in the trunk, but the code doesn't make use of them. Hmm. Can't be sure right now. Opinions? -- Ozkan > > On 27/04/11 16:32, Ozkan Sezer wrote: >> On Wed, Apr 27, 2011 at 5:27 PM, Simon de Graaf<[email protected]> wrote: >>> Hi, >> Hi: we might need a little bit more detail, >> >>> I downloaded the latest cross-compiler and found out >> Precisely which one? >> >>> that the printf %f format does not work to print doubles/floats. >>> It gives back a zero value. >>> >> Can you please post your code and describe how you compile >> and link it? >> >>> Regards >>> Simon de Graaf >> -- >> O.S. > ------------------------------------------------------------------------------ WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd _______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
