log2.php
Table of Contents
Functions
- log2() : string
- Return the base-2 logarithm of a value.
Functions
log2()
Return the base-2 logarithm of a value.
log2(string|int|float $value) : string
This helper wraps the ArangoDB AQL function LOG2(value) which returns
the base-2 logarithm of a value. The value must be greater than 0,
otherwise it returns null.
Example AQL usage:
LOG2(1) // returns 0
LOG2(2) // returns 1
LOG2(4) // returns 2
LOG2(8) // returns 3
LOG2(0) // returns null (invalid input)
Parameters
- $value : string|int|float
-
The input value (must be greater than 0).
Tags
Return values
string —The formatted AQL expression.