Cypher Log Function

log() returns the natural logarithm of a number.

Syntax: log(expression)

Returns: A Float.

Arguments

NameDescription
expressionA numeric expression.

Example

RETURN log(5)

The value returned will be the natural log of 5, which is 1.6094379124341003.

Considerations

  • log(null) returns null.
  • log(0) returns -Infinity.
  • log(<Any negative number>) returns NaN (Not a Number).

Example

RETURN log(1)

Returns the following Result

log(1)
0.0

Example

RETURN log(7)

Returns the following Result

log(7)
1.9459101490553132

Example

RETURN log(2.737)

Returns the following Result

log(2.737)
1.006862430058542

Example

RETURN log(-1)

Returns the following Result

log(-1)
NaN

Notelog(<Any Negative Number>) returns NaN.

Example

RETURN log(null)

Returns the following Result

log(null)
null

Notelog(null) returns null.

Example

RETURN log(0)

Returns the following Result

log(0)
-Infinity

Notelog(0) returns -Infinity.

Learn More