e

e() returns the base of the natural logarithm, e.

Syntax: e()

Returns:

  1. An agtype float.

Query

  1. SELECT *
  2. FROM cypher('graph_name', $$
  3. RETURN e()
  4. $$) as (e agtype);

Results

e
2.71828182845905
1 row(s) returned

sqrt

sqrt() returns the square root of a number.

Syntax: sqrt(expression)

Returns:

  1. An agtype float.

Query

  1. SELECT *
  2. FROM cypher('graph_name', $$
  3. RETURN sqrt(144)
  4. $$) as (results agtype);

Results

results
12
1 row(s) returned

exp

exp() returns e^n, where e is the base of the natural logarithm, and n is the value of the argument expression.

Syntax: exp(expression)

Returns:

  1. An agtype float.

Arguments:

Name Description
expression An agtype number expression

Considerations:

  • exp(null) returns null.

Query:

  1. SELECT *
  2. FROM cypher('graph_name', $$
  3. RETURN exp(2)
  4. $$) as (e agtype);

e to the power of 2 is returned.

Result:

e
7.38905609893065
1 row(s) returned

log

log() returns the natural logarithm of a number.

Syntax: log(expression)

Returns:

  1. An agtype float.

Arguments:

Name Description
expression An agtype number expression

Considerations:

  • log(null) returns null.
  • log(0) returns null.

Query:

  1. SELECT *
  2. FROM cypher('graph_name', $$
  3. RETURN log(27)
  4. $$) as (natural_logarithm agtype);

The natural logarithm of 27 is returned.

Result:

natural_logarithm
3.295836866004329
1 row(s) returned

log10

log10() returns the common logarithm (base 10) of a number.

Syntax: log10(expression)

Returns:

  1. An agtype float.

Arguments:

Name Description
expression An agtype number expression

Considerations:

  • log10(null) returns null.
  • log10(0) returns null.

Query:

  1. SELECT *
  2. FROM cypher('graph_name', $$
  3. RETURN log10(27)
  4. $$) as (common_logarithm agtype);

The common logarithm of 27 is returned.

Result:

common_logarithm
1.4313637641589874
1 row(s) returned