Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!snorkelwacker!ira.uka.de!rusux1!phobix!wschmidt From: wschmidt@phobix (Wolfram Schmidt) Newsgroups: comp.sys.amiga Subject: Re: Lattice C double Message-ID: <276@rusux1.rus.uni-stuttgart.de> Date: 3 Oct 90 22:10:50 GMT References: <1990Sep28.063045.2599@ericsson.se> Sender: zrf80385@rusux1.rus.uni-stuttgart.de Reply-To: wschmidt@IAO.FhG.de (Wolfram Schmidt) Distribution: comp Lines: 23 In article <1990Sep28.063045.2599@ericsson.se> etxpnil@etxsj23.ericsson.se (Per Nilsson TT/SJG 98194 ) writes: >The following is a test program I've compiled with the Lattice C compiler. > >main() >{ > double dub; > dub = 12345678.0; > dub = dub * 10.0; > printf("%.9g\n",dub); >} >When compiled with the Lattice C V5.04, I've got the following output: >123456779.999999999 [...] I tried this with Aztec C 5.0a. With the MANX supplied libraries the result was O.K. With the Amiga IEEE libraries I got the same as above. With FFP the result was even worse. Wolfram -- Wolfram Schmidt wschmidt@iao.fhg.de Wolfram Schmidt Teckstr. 11 W-7056 Weinstadt Germany +49-7151/62408 MET