log10(8)

Rich Walters raw at math.arizona.edu
Tue Feb 27 13:58:48 AEST 1990


In article <3244 at servax0.essex.ac.uk> elzea at sersun0.essex.ac.uk (El-Zein A A) writes:
>
>	My calculator gives me 0.9030899 for log(8),
>	While the following code (which I thought would
>	give me the above value of 0.9030899) prints 
>	-312.770165.
>
>	double l;
>	.
>	l = log10(8);
>	printf("%f", l);
>       .
>
>	Can anybody tell me why.
>

Try printf"%lf",l);  after all l is declared to be a double!!!!!!!!



					Richard Walter



-------------------------------------------------------------------------------

			Keep on crunching those numbers

-------------------------------------------------------------------------------



More information about the Comp.lang.c mailing list