delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2008/02/22/02:10:23

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
X-Recipient: djgpp AT delorie DOT com
From: Sterten AT aol DOT com
Message-ID: <c7b.2773db24.34efcc13@aol.com>
Date: Fri, 22 Feb 2008 01:56:19 EST
Subject: double
To: djgpp AT delorie DOT com
MIME-Version: 1.0
X-Mailer: 9.0 SE for Windows sub 5018
X-Spam-Flag: NO
Reply-To: djgpp AT delorie DOT com

-------------------------------1203663379
Content-Type: text/plain; charset="US-ASCII"
Content-Transfer-Encoding: 7bit

double x;
int main(int argc,char*argv[]){  
x=1.23;
printf("x=%13.12Lf\n",x);
}
 
prints x=0.000000000000 instead of x=1.230000000000
what's wrong ?



   

-------------------------------1203663379
Content-Type: text/html; charset="US-ASCII"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3DUS-ASCII">
<META content=3D"MSHTML 6.00.5730.11" name=3DGENERATOR></HEAD>
<BODY id=3Drole_body style=3D"FONT-SIZE: 10pt; COLOR: #000000; FONT-FAMILY:=20=
Arial"=20
bottomMargin=3D7 leftMargin=3D7 topMargin=3D7 rightMargin=3D7><FONT id=3Drol=
e_document=20
face=3DArial color=3D#000000 size=3D2>
<DIV>double x;<BR>int main(int argc,char*argv[]){=20
<BR>x=3D1.23;<BR>printf("x=3D%13.12Lf\n",x);<BR>}</DIV>
<DIV>&nbsp;</DIV>
<DIV>prints x=3D0.000000000000 instead of x=3D1.230000000000</DIV>
<DIV>what's wrong ?</DIV></FONT>   </BODY></HTML>

-------------------------------1203663379--

- Raw text -


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