float to double pain

Mike Leibow mikel at ritcsh.cs.rit.edu
Tue Dec 11 03:32:12 AEST 1990


On some machines, the floats in the following program are promoted to doubles,
and other machines, the floats remain floats.  I believe that these floats
shoud never look like doubles... What do you think?


check(af1)
float *af1; /* if this is "double," then this program works on most machines*/
{
	printf("%f\n", *af1);	/* and you'd have to change %f to %lf */
}

t(f1)
float f1;
{
	check(&f1);
}

main()
{
	t(4.0);
}


If you post a followup, I'll probably not see it because our news disk is
always full.  Please send me email...

	--Mike

mikel at ritcsh.cis.rit.edu



More information about the Comp.lang.c mailing list