exp2.php
Table of Contents
Functions
- exp2() : string
- Return 2 raised to the power of a value.
Functions
exp2()
Return 2 raised to the power of a value.
exp2(string|int|float $value) : string
This helper wraps the ArangoDB AQL function EXP2(value) which returns
2 raised to the power of the given value. This is useful for binary
operations and exponential growth calculations.
Example AQL usage:
EXP2(0) // returns 1
EXP2(1) // returns 2
EXP2(2) // returns 4
EXP2(3) // returns 8
EXP2(-1) // returns 0.5
Parameters
- $value : string|int|float
-
The exponent value.
Tags
Return values
string —The formatted AQL expression.