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: Brian Chapman <tchapman@xxxxxxxxxxxxx>
Date: Sun, 05 Mar 2000 11:02:47 -0600
Reply-to: discussion@xxxxxxxxx

> 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


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