Calculating 10 based logarithm


This example demonstrates how to use the built-in 10 based logarithm (log10f) function of SDCC.

Toolkit:SDCC 8051 Development System

Location:/bipom/devtools/sdcc/examples/math/log10

Code Example


int main()
{
	float x;
	/* Set the serial port to 19200 Baud */
	serinit(CBR_19200);
	x = 1000.0;
	printf( "\n\rLog of %6.2f is %6.2f", x, log10f(x) );
	return 0;
}