-
-
Notifications
You must be signed in to change notification settings - Fork 18
logn
Vašek edited this page Jan 13, 2019
·
2 revisions
Returns the log base x of n
logn(x, n)
Argument | Description |
---|---|
double x |
The log base |
double n |
The input value |
Returns: double
This function is similar to the log2
and log10
functions but in this function, your input is the log base. You are asking: "How many times x
must be powered by to equal n
?" For example, logn(3,27) will return 3, because 3x3x3 = 27.
double value;
value = power(5, 3);
This code set value
to 125.
double value;
value = logn(6,36);
This code will set value
to 2.
double value;
value = logn(10,0.01);
This code will set value
to -1,999999.
Back to number_functions