Simple atof() question
Xiang-Min Wang
xwang at gmuvax2.gmu.edu
Sun Mar 24 13:43:50 AEST 1991
In article <1214 at caslon.cs.arizona.edu> armstron at 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
More information about the Comp.lang.c
mailing list