Math Query Functions
LogScale's math query functions provide a range of arithmetical and numerical functions.
Note
Math functions on ARM architecture may return different results in very high-precision calculationsc compared to Intel/AMD architectures.
Table: Math Query Functions
| Function | Default Argument | Availability | Description |
|---|---|---|---|
math:abs([as], field) | field | Â | Calculates the absolute value of a field; the result is always a positive number or 0. |
math:arccos([as], field) | field | Â | Calculates the arc cosine of a field. |
math:arcsin([as], field) | field | Â | Calculates the arc sine of a field. |
math:arctan([as], field) | field | Â | Calculates the arc tangent of a value. |
math:arctan2([as], x, y) | Â | Â | Calculates the arc tangent of a value. |
math:ceil([as], field) | field | Â | Rounds field value to smallest integer that's larger than or equal to it. |
math:cos([as], field) | field | Â | Calculates the cosine of a field. |
math:cosh([as], field) | Â | Â | Computes the hyperbolic cosine of a double field. |
math:deg2rad([as], field) | field | Â | Converts angles from degrees to radians. |
math:exp([as], field) | field | Â | Calculates Euler's number e raised to the power of a double value in a field. |
math:expm1([as], field) | field | Â | Calculates the exponential value of a number minus 1. |
math:floor([as], field) | field | Â | Computes the largest integer value not greater than the field value given. |
math:log([as], field) | field | Â | Calculates the natural logarithm (base e) of the value in a double field. |
math:log10([as], field) | field | Â | Calculates the base 10 logarithm of a double field. |
math:log1p([as], field) | field | Â | Calculates the natural logarithm of the sum of field's value and 1. |
math:log2([as], field) | field | Â | Calculates the base 2 logarithm of a double field. |
math:mod([as], divisor, field) | field | Â | Calculates the floor modulus of field value and the divisor. |
math:pow([as], exponent, field) | field | Â | Calculates the field value to the exponent power. |
math:rad2deg([as], field) | field | Â | Converts angles from radians to degrees. |
math:sin([as], field) | field | Â | Calculates the sine of a field. |
math:sinh([as], field) | field | Â | Calculates the hyperbolic sine of a double field. |
math:spherical2cartesian([as], azimuth, polar, radius) | Â | Â | Calculates the average for a field of a set of events. |
math:sqrt([as], field) | field | Â | Calculates the rounded positive square root of a double field. |
math:tan([as], field) | field | Â | Calculates the trigonometric tangent of an angle in a field. |
math:tanh([as], field) | field | Â | Calculates the hyperbolic tangent of a field. |
parseHexString([as], [charset], field) | field | Â | Parses input from hex encoded bytes, decoding resulting bytes as a string. |
parseInt([as], [endian], field, [radix]) | field | Â | Converts an integer from any radix or base to base-ten, decimal radix. |
round([as], field, [how]) | field | Â | Rounds an input field up or down, depending on which is nearest. |
unit:convert([as], [binary], field, [from], [keepUnit], [to], [unit]) | field | Â | Converts values between different units. |