Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!udel!haven!umbc3!gmuvax2!xwang From: xwang@gmuvax2.gmu.edu (Xiang-Min Wang) Newsgroups: comp.lang.c Subject: Re: Simple atof() question Message-ID: <3910@gmuvax2.gmu.edu> Date: 24 Mar 91 03:43:50 GMT References: <1214@caslon.cs.arizona.edu> Reply-To: xwang@gmuvax2.UUCP (Xiang-Min Wang) Distribution: na Organization: George Mason Univ. Fairfax, Va. Lines: 14 In article <1214@caslon.cs.arizona.edu> armstron@cs.arizona.edu (Jim Armstrong) writes: > >How can I get atof() to return a float instead of a double? >When I run this simple program I get n = 37.549999 instead of >n = 37.55. What am I doing wrong? > I think the error is caused by the physical machine. It is nothing to do with the float-type conversion. Also, I think you did what you needed to do. >Jim Armstrong "The nonpayment and subsequent abuse of xwang