log2 - Calculate log to base 2
log2
is a shorthand for computing log(2, number)
. It calculates the log, to base 2, for a given value.
Syntax
Like many functions in DataPrime, log2
supports two notations, function and method notation. These interchangeable forms allow flexibility in how you structure expressions.
Arguments
Name | Type | Required | Description |
---|---|---|---|
number | number | true | The value whose logarithm we wish to find |
Example - Basic usage
The log2
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