[aclug-L] Re: C problem redux....
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Brian Chapman wrote:
>
> > Here's the output:
> >
> > number: 5.333009
> > number: 349440.000000
> >
> > Where on earth is it getting 349440.000000 ? I get the same results when
> > I try atof(number). Sunday is an odd day, right?
> >
> > Larry Bottorff
>
> right. that's because the default precision specifier for floating point
> is '%1.6f'. if you don't want all those decimal places printed use
> something like '1.2' or '1.0'.
>
> -- This is the discussion@xxxxxxxxx list. To unsubscribe,
> visit http://tmp2.complete.org/cgi-bin/listargate-aclug.cgi
Issue deeper. I fooled around with %lf, %f, %g, no dice. I just tried
the code on a Debian machine: worked fine. I'm using SuSE 6.3. Ouch!
-- This is the discussion@xxxxxxxxx list. To unsubscribe,
visit http://tmp2.complete.org/cgi-bin/listargate-aclug.cgi
[aclug-L] Re: C problem redux...., Tom Hull, 2000/03/05
|
|