compile-time function - (nf)

malcolm at pur-ee.UUCP malcolm at pur-ee.UUCP
Sun Oct 16 17:29:10 AEST 1983

ecn-ee!malcolm    Oct 16 02:54:00 1983

Not to be outdone on this trivial programming assignment....

I use the following one-liner to find the base two logarithm at run-time.
	for (logN=0;(1<<logN)<N;logN++);

						Malcolm Slaney
						Purdue EE Dept.

More information about the Comp.lang.c mailing list