Path: utzoo!attcan!uunet!aplcen!samsung!zaphod.mps.ohio-state.edu!wuarchive!psuvax1!rutgers!cbmvax!ken From: ken@cbmvax.commodore.com (Ken Farinsky - CATS) Newsgroups: comp.sys.amiga Subject: Re: Lattice C double Message-ID: <14795@cbmvax.commodore.com> Date: 2 Oct 90 14:48:01 GMT References: <1990Sep28.063045.2599@ericsson.se> Reply-To: ken@cbmvax.commodore.com (Ken Farinsky - CATS) Organization: Commodore, West Chester, PA 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 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. -- -- Ken Farinsky - CATS - (215) 431-9421 - Commodore Business Machines uucp: ken@cbmvax.commodore.com or ...{uunet,rutgers}!cbmvax!ken bix: kfarinsky