Oihana PHP Arango

log10.php

Table of Contents

Functions

log10()  : string
Return the base-10 logarithm of a value.

Functions

log10()

Return the base-10 logarithm of a value.

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

This helper wraps the ArangoDB AQL function LOG10(value) which returns the base-10 logarithm (common logarithm) of a value. The value must be greater than 0, otherwise it returns null.

Example AQL usage:

LOG10(1)                      // returns 0
LOG10(10)                     // returns 1
LOG10(100)                    // returns 2
LOG10(1000)                   // returns 3
LOG10(0)                      // returns null (invalid input)
Parameters
$value : string|int|float

The input value (must be greater than 0).

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

$expr = log10(100);
// Produces: 'LOG10(100)'
see
https://docs.arangodb.com/stable/aql/functions/numeric/#log10
log()

For the natural logarithm.

log2()

For the base-2 logarithm.

since
1.0.0
author

Marc Alcaraz

Return values
string

The formatted AQL expression.

On this page

Search results