Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 (USS@Tek, v1.0) based on 4.3bsd-beta 6/6/85; site tekigm2.UUCP Path: utzoo!watmath!clyde!burl!ulysses!bellcore!decvax!decwrl!pyramid!hplabs!tektronix!tekig5!tekigm2!normc From: normc@tekigm2.UUCP (Norm Church) Newsgroups: net.micro.amiga Subject: Floating point routines with Lattice V3.03 - Questions ?? Message-ID: <487@tekigm2.UUCP> Date: Mon, 10-Mar-86 18:09:44 EST Article-I.D.: tekigm2.487 Posted: Mon Mar 10 18:09:44 1986 Date-Received: Fri, 14-Mar-86 04:32:23 EST Reply-To: normc@tekigm2.UUCP (Norm Church) Organization: Tektronix, Inc., Beaverton, OR. Lines: 43 To: net.micro.amiga Cc: normc Subject: Floating Point with Lattice V3.03 - Question ? I am having a problem using the floating point function with the Lattice Version 3.03 compiler on my Amiga. I don't know if the problem is in my code or something else in the system. I have listed the sample program below and would appreciate any help available to get me headed in the right direction. /* float2.c test floating point in V3.03 */ #include main() { float f1; char ans[50]; printf("\nInput ascii to float value "); scanf("%s", ans); f1=atof(ans); printf("\n%g", f1); printf("\n%f", f1); printf("\n%e", f1); printf("\nInput floating point value "); scanf("%f", f1); printf("\n%g", f1); printf("\n%f", f1); printf("\n%e\n", f1); } ------------------------------ The results in each case was some very large number that appeared to be a constant. I don't have the actual results with me at the moment but the conversion didn't work and I don't know what I am doing wrong. Thanks for you help, Norm