From: bd733 AT rgfn DOT epcc DOT edu (Jason M. Daniels) Newsgroups: comp.os.msdos.djgpp Subject: Re: Possible bug? Date: 4 Jun 1997 16:48:19 GMT Organization: The Rio Grande Free-Net, El Paso Community College, El Paso, TX Lines: 27 Distribution: world Message-ID: <5n468j$2jt@news.epcc.edu> References: <5n3dqh$s3g AT bagan DOT srce DOT hr> <5n3i63$145 AT star DOT cs DOT vu DOT nl> NNTP-Posting-Host: rgfn.epcc.edu To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Ruiter de M (mdruiter AT cs DOT vu DOT nl) wrote: > Simun Mikecin (sime AT fly DOT cc DOT fer DOT hr) wrote: > : Philip Ibis (pibis AT host DOT hawk DOT igs DOT net) wrote: > : : double n; > : : memset(&n,0xFF,sizeof(double)); /* contrived, sure */ > : : printf("%f\n",n); > : ^^ > : Have you tried using %lf here? > Why? According to the docs, %hf is for floats, %f is for doubles and > %lf is for long doubles (what's that? same as doubles, for DJGPP?). > Scanf differs. > : P.S. I think that conforming to ANSI %f is for float, %lf for double and %Lf > : for long double. But since the way these are implemented on x86 platforms it > : ussualy works with any format. > Ummm, I don't think so. But then again, who am I? :) No, the way DJGPP impliments it is quite correct. This is, in fact, discussed in the comp.lang.c FAQ. -- Jason Daniels -- bd733 AT rgfn DOT epcc DOT edu ---> BELIEVE THE LIE <--- Linux: The choice of a GNU generation. Winblows 95: The world's best-selling computer virus.