Skip to content
drewmccluskey edited this page Jan 14, 2019 · 4 revisions

log10

This function returns the log base 10 of n

Syntax:

log10(n)
Argument Description
double n The input value

Returns: double

Description:

The function asks: "How many times does the number 10 have to be multiplied by itself to equal n?" For example, function log10(1000) will return 3, because 10x10x10 = 1000. There are 3 powers of 10 to equal 1000.

Example:

double value;
value = log10(100);

This code will set value to 2. There are 2 powers of 10 to equal 100.

Example 2:

double value;
value = log10(0.2);

This code will set value to -0.69897. There are -0.69897 powers of 10 to equal 0.2.

Back to number_functions

Clone this wiki locally