-
-
Notifications
You must be signed in to change notification settings - Fork 19
logn
drewmccluskey edited this page Jan 14, 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 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.
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