pow.php
Table of Contents
Functions
- pow() : string
- Return the base raised to the power of the exponent.
Functions
pow()
Return the base raised to the power of the exponent.
pow(mixed $base, int $exp) : string
This helper wraps the ArangoDB AQL function POW(base, exp) which returns
the base raised to the power of the exponent. This is equivalent to base^exp.
Example AQL usage:
POW(2, 3) // returns 8 (2³)
POW(10, 2) // returns 100 (10²)
POW(5, 0) // returns 1 (any number to power 0)
POW(2, -1) // returns 0.5 (2⁻¹)
Parameters
- $base : mixed
-
The base value.
- $exp : int
-
The exponent value.
Tags
Return values
string —The formatted AQL expression.