Loading

ES|QL mathematical functions

ES|QL supports these mathematical functions:

  • ABS

    Returns the absolute value of a number.

  • ACOS

    Returns the arccosine of a number.

  • ACOSH

    Returns the inverse hyperbolic cosine of a number.

  • ASIN

    Returns the arcsine of a number.

  • ASINH

    Returns the inverse hyperbolic sine of a number.

  • ATAN

    Returns the arctangent of a number.

  • ATAN2

    Returns the two-argument arctangent of y and x coordinates.

  • ATANH

    Returns the inverse hyperbolic tangent of a number.

  • CBRT

    Returns the cube root of a number.

  • CEIL

    Rounds a number up to the nearest integer.

  • COPY_SIGN

    Combines the magnitude of one number with the sign of another.

  • COS

    Returns the cosine of an angle.

  • COSH

    Returns the hyperbolic cosine of a number.

  • E

    Returns the mathematical constant e.

  • EXP

    Returns the value of e raised to the power of the given number.

  • FLOOR

    Rounds a number down to the nearest integer.

  • HYPOT

    Returns the hypotenuse of two numbers.

  • LOG

    Returns the logarithm of a value to a base.

  • LOG10

    Returns the base-10 logarithm of a number.

  • PI

    Returns the mathematical constant pi.

  • POW

    Returns a value raised to the power of an exponent.

  • ROUND

    Rounds a number to the specified number of decimal places.

  • ROUND_TO

    Rounds down to one of a list of fixed points.

  • SCALB

    Returns the result of multiplying a number by 2 raised to a scale factor.

  • SIGNUM

    Returns the sign of the given number.

  • SIN

    Returns the sine of an angle.

  • SINH

    Returns the hyperbolic sine of a number.

  • SQRT

    Returns the square root of a number.

  • TAN

    Returns the tangent of an angle.

  • TANH

    Returns the hyperbolic tangent of a number.

  • TAU

    Returns the mathematical constant tau.