Loading TOC...

MarkLogic 12 EA 2 Product Documentation
math functions

The table below lists all the math built-in functions (in this namespace: http://marklogic.com/xdmp/math).

The math built-in functions.

43 functions
Function name Description
math.acos Returns the arc cosine of x, in radians, in the range from 0 to pi (inclusive).
math.asin Returns the arc sine of x, in radians, in the range from -pi/2 to +pi/2 (inclusive).
math.atan Returns the arc tangent of x, in radians.
math.atan2 Returns the arc tangent of y/x, in radians, in the range from -pi/2 to +pi/2 (inclusive), using the signs of y and x to determine the appropriate quadrant.
math.ceil Returns the smallest integer greater than or equal to x.
math.correlation Returns the Pearson correlation coefficient of a data set.
math.cos Returns the cosine of x, in the range from -1 to +1 (inclusive).
math.cosh Returns the hyperbolic cosine of x.
math.cot Returns the cotangent of x.
math.covariance Returns the sample covariance of a data set.
math.covarianceP Returns the population covariance of a data set.
math.degrees Returns numeric expression converted from radians to degrees.
math.exp Returns e (approximately 2.71828182845905) to the xth power.
math.fabs Returns the absolute value of x.
math.floor Returns the largest integer less than or equal to x.
math.fmod Returns the remainder of x/y.
math.frexp Returns x broken up into mantissa and exponent, where x = mantissa*2^exponent.
math.ldexp Returns x*2^i.
math.linearModel Returns a linear model that fits the given data set.
math.linearModelCoeff Returns the coefficients of the linear model.
math.linearModelIntercept Returns the intercept of the linear model.
math.linearModelRsquared Returns the R^2 value of the linear model.
math.log Returns the base-e logarithm of x.
math.log10 Returns the base-10 logarithm of x.
math.median Returns the median of a sequence of values.
math.mode Returns the mode of a sequence.
math.modf Returns x broken up into fraction and integer.
math.percentile Returns a sequence of percentile(s) given a sequence of percentage(s).
math.percentRank Returns the rank of a value in a data set as a percentage of the data set.
math.pi Returns the value of pi.
math.pow Returns x^y.
math.radians Returns numeric expression converted from degrees to radians.
math.rank Returns the rank of a value in a data set.
math.sin Returns the sine of x, in the range from -1 to +1 (inclusive).
math.sinh Returns the hyperbolic sine of x.
math.sqrt Returns the square root of x.
math.stddev Returns the sample standard deviation of a sequence of values.
math.stddevP Returns the standard deviation of a population.
math.tan Returns the tangent of x.
math.tanh Returns the hyperbolic tangent of x, in the range from -1 to +1 (inclusive).
math.trunc Returns the number truncated to a certain number of decimal places.
math.variance Returns the sample variance of a sequence of values.
math.varianceP Returns the population variance of a sequence of values.