log

Synopsis

float log(int base, float x)
float log(int base, int x)

Description

Log computes the logarithm of x, given a base. X can be an integer or a float, while the base must always be an integer.

Example

>> log (100, 10)
0.5
>> log (10, 100)
2.0
>> log (2, 64)
6.0

See also

ln