log2
Description
Returns the base-2 logarithm of a number. Equivalent to log(2, number).
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 base-2 logarithm will be computed |
Example
Use case: Apply a log base 2 transformation
Compute the log base 2 of a numerical field and store the result in a new field.
Example data
Example query
Example output
Theme
Light