log10

Returns the log base 10 of n.

Syntax:

GML Code Example

log10(n);


Argument Description
n The input value.


Returns: Real


Description

This function is similar to the log2(n) function, only that log10(n) gets the number of 10's that we need to multiply together to get n. So log10(100) returns 2, as multiplying 10 by itself gives 100, log10(1000) returns 3 as 10x10x10=1000 etc... The number does not have to be divisible by ten, however, but this will still return an appropriate value, for example if we have log10(101) we get 2.00432137... which is how many times you could divide 101 by 10.


Example:

GML Code Example

logval = log10(num);

The above code gets the log10 of the value stored in "num".





No Examples Submitted

Does this page need better examples? Be the first to Submit

No Edits Suggested

Is this page unclear or not descriptive enough? Suggest an edit to the page and with enough upvotes your changes will be made.

No Questions Have Been Ask

Do you have a question about this page? Ask it Here