delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/06/05/03:20:54

From: mdruiter AT cs DOT vu DOT nl (Ruiter de M)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Possible bug?
Date: 4 Jun 1997 11:05:39 GMT
Organization: Fac. Wiskunde & Informatica, VU, Amsterdam
Distribution: world
Message-ID: <5n3i63$145@star.cs.vu.nl>
References: <Pine DOT BSI DOT 3 DOT 91 DOT 970603215937 DOT 1369A-100000 AT host DOT hawk DOT igs DOT net> <5n3dqh$s3g AT bagan DOT srce DOT hr>
NNTP-Posting-Host: sloep111.cs.vu.nl
Lines: 22
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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? :)
-- 
Groeten, Michel.        http://www.cs.vu.nl/~mdruiter
 \----/==\----/
  \  /    \  /          "Als je voetbalcriminaliteit wilt tegengaan,
   \/      \/           moet je ophouden met voetballen", Nordholt.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019