log - Compute logarithm to any base
Logarithms are used for everything, from modelling compound interest, exponential growth, and decay, to finding the pH level of substance, to knowing the magnitude of an earthquake. DataPrime supports logarithms using the log
function.
This function returns the logarithm of a given number, to a given base.
Syntax
Arguments
Name | Type | Required | Description |
---|---|---|---|
base | number | true | The log base to use, for example 2 will compute log to base 2 |
number | number | true | The value whose logarithm we wish to find |
Example - Basic usage
The log
command is simple and intuitive to use:
This command will create a new field, log_field
which is equal to the log to base 2 of some_value
.
NOTE: some_value
MUST be a numerical type.
Theme
Light