Oihana PHP Arango

exp.php

Table of Contents

Functions

exp()  : string
Return Euler's constant (e) raised to the power of a value.

Functions

exp()

Return Euler's constant (e) raised to the power of a value.

exp(string|int|float $value) : string

This helper wraps the ArangoDB AQL function EXP(value) which returns Euler's constant (approximately 2.71828) raised to the power of the given value. This is the inverse of the natural logarithm function.

Example AQL usage:

EXP(0)                        // returns 1
EXP(1)                        // returns 2.718281828459045 (e)
EXP(2)                        // returns 7.38905609893065 (e²)
EXP(-1)                       // returns 0.36787944117144233 (1/e)
Parameters
$value : string|int|float

The exponent value.

Tags
example
use function oihana\arango\db\functions\numerics\exp;

$expr = exp(1);
// Produces: 'EXP(1)'
see
https://docs.arangodb.com/stable/aql/functions/numeric/#exp
exp2()

For 2 raised to a power.

log()

For the natural logarithm (inverse of EXP).

since
1.0.0
author

Marc Alcaraz

Return values
string

The formatted AQL expression.

On this page

Search results