Complete.Org: Mailing Lists: Archives: discussion: March 2000:
[aclug-L] Re: C problem redux....
Home

[aclug-L] Re: C problem redux....

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: discussion@xxxxxxxxx
Subject: [aclug-L] Re: C problem redux....
From: Larry Bottorff <mrprenzl@xxxxxxxxxx>
Date: Sun, 05 Mar 2000 12:26:35 -0600
Reply-to: discussion@xxxxxxxxx

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


[Prev in Thread] Current Thread [Next in Thread]