Path: utzoo!attcan!uunet!mailrus!ncar!boulder!snoopy!wallwey From: wallwey@snoopy.Colorado.EDU (WALLWEY DEAN WILLIAM) Newsgroups: comp.windows.ms Subject: Re: Problems with the MEDIUM-Model library Message-ID: <22108@boulder.Colorado.EDU> Date: 11 Jun 90 18:21:41 GMT References: <1884@cybaswan.UUCP> Sender: news@boulder.Colorado.EDU Reply-To: wallwey@snoopy.Colorado.EDU (WALLWEY DEAN WILLIAM) Organization: University of Colorado, boulder Lines: 15 In article <1884@cybaswan.UUCP> eeingers@cybaswan.UUCP (m t ingersoll) writes: > >Hi there, > I've been experiencing some problems with the medium-model library >in a Windows application. The most noticeable problem is floating- >point errors: e.g. sprintf(Buf, "%lf", 1.23) actually prints 0.123 into 'Buf'! If I'm not mistaken you are passing a float when sprintf is expecting a long float. Try this: sprintf(Buf, "%lf", (long float) 1.23); I think this will work, but I don;t have my manual or C here! -Dean Wallwey