Math Query Functions

LogScale's math query functions provide a range of arithmetical and numerical functions.

Table: Math Query Functions

FunctionDefault ArgumentAvailabilityDescription
base64Decode([as], [charset], field)field Performs Base64 decoding of a field.
math:abs([as], field)field Calculates the absolute value of a field.
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], xfield, yfield)  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)  Returns 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 Returns the exponential value of a number minus 1.
math:floor([as], field)field Returns 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.
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.