Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!van-bc!ubc-cs!alberta!calgary!spycal!sdscal!keith From: keith@sdscal.UUCP (Keith Jones) Newsgroups: comp.sys.ibm.pc Subject: Re: scanf problem in TC v2.01. Summary: Turbo C 2.0 floating point problem, sample program Message-ID: <204@sdscal.UUCP> Date: 17 Feb 90 00:05:00 GMT References: <7192.25d1e107@dit.ie> <25D4D935.3073@maccs.dcss.mcmaster.ca> <25D8649A.24584@maccs.dcss.mcmaster.ca> Organization: Stream Data Systems, Calgary, Alberta Lines: 43 In article <25D8649A.24584@maccs.dcss.mcmaster.ca>, cs4g6ag@maccs.dcss.mcmaster.ca (Stephen M. Dunn) writes: > In article <90043.093434CMH117@PSUVM.BITNET> CMH117@psuvm.psu.edu (Charles Hannum) writes: > $In article <25D4D935.3073@maccs.dcss.mcmaster.ca>, > $Please, people! If you're going to post bug reports, please give SPECIFIC > $EXAMPLES so us hackers can trace down the offending bug and obliterate it! > $Generalized statements like this ARE NOT HELPFUL! Well, I didn't quite believe it, but I made this test file and sure enough, the printf doesn't print out anything that even looks like it approximates PI. ----- to cut ----- or not to cut ----- main() { float f; char *string = "3.1415926"; f = atof( string ); printf( "pi = %f\n", f ); } ----- be it here ----- or there ----- The output to this program was: D:\ -> test -8209.00000 and I compiled it with: D:\ -> tcc test I'm not particularly worried about this bug, but I figured I might as well post the program. Enjoy, Keith. -- Keith Jones ...!calgary!spycal!sdscal!keith Stream Data Systems I don't have a signature because my pen Calgary, Alberta, Canada keeps scratching up my monitor.