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

logn

Returns the log base x of n

Syntax:

logn(x, n)
Argument Description
double x The log base
double n The input value

Returns: double

Description:

This function is similar to the log2 and log10 functions, but in this function, your x input is the log base. You are asking: "How many times must x be multiplied by itself to equal n?" For example, logn(3, 27) will return 3, because 3x3x3 = 27.

Example:

double value;
value = logn(6, 36);

This code will set value to 2.

Example 2:

double value;
value = logn(10, 0.01);

This code will set value to -1.999999.

Back to number_functions

Clone this wiki locally