Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!olivea!mintaka!bloom-beacon!eru!hagbard!sunic!ericom!etxsj23.ericsson.se!etxpnil From: etxpnil@etxsj23.ericsson.se (Per Nilsson TT/SJG 98194 ) Newsgroups: comp.sys.amiga Subject: Re: Lattice C double Message-ID: <1990Oct4.063507.1899@ericsson.se> Date: 4 Oct 90 06:35:07 GMT References: <1990Sep28.063045.2599@ericsson.se> <14795@cbmvax.commodore.com> Sender: news@ericsson.se Organization: Ericsson Telecom, Stockholm, Sweden Lines: 22 In article <14795@cbmvax.commodore.com> ken@cbmvax.commodore.com (Ken Farinsky - CATS) writes: >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 > >Are you using the correct compiler flags and linker options to get >double-precision IEEE numbers? (compile with -fi, link with >lcmieee.lib?) These results look like FFP or single precision >IEEE numbers. I've now tried it with the -fi switch and the lcmieee.lib, with the same result. I tried the new SAS/C V5.10 and I got the same result there.