Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!bloom-beacon!usc!polyslo!csun!solaria!ecphssrw@winston.csun.edu From: ecphssrw@winston.csun.edu (Stephen Walton) Newsgroups: comp.sys.amiga Subject: Re: Manx and floats Message-ID: <675@solaria.csun.edu> Date: 28 Apr 89 01:35:01 GMT References: <13477@louie.udel.EDU> Sender: ecphssrw@solaria.csun.edu Reply-To: ecphssrw@winston.csun.edu (Stephen Walton) Organization: California State Univ., Northridge Lines: 25 In-reply-to: mermelstein@inrs-telecom.uquebec.ca (Lois Mermelstein) In article <13477@louie.udel.EDU>, mermelstein@inrs-telecom (Lois Mermelstein) writes: >My setup for using Manx 3.6a with floats is > #include [somewhere near the top of my source code] > compile using cc [filename] [no options] > link using ln [filename.o] -lm -lc > >you'll discover that SDB won't >be able to tell you the correct values of any floating point (float OR >double) variables... This is because SDB was apparently compiled with the IEEE format. Use the +FI switch and link with -lmx or -lma. The latter uses CBM's mathieeedoubbas- .library, which will use a 68881 on a system with one and software without. +F8 of course requires a 68881 and linking with -lm8 (and also works with SDB). >I also had a problem with fscanf; I think using %e helped it, but I >don't remember if I ever figured out *why* Just remember (1) pass pointers to scanf and (2) if you pass a pointer to double instead of a pointer to long, precede the conversion character by l (that's lower-case letter ell), as in "%le" or "%lf". -- Stephen Walton, Dept. of Physics & Astronomy, Cal State Univ. Northridge RCKG01M@CALSTATE.BITNET ecphssrw@afws.csun.edu swalton@solar.stanford.edu ...!csun!afws.csun.edu!ecphssrw