Loading TOC...

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:covariance-p 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:linear-model Returns a linear model that fits the given data set.
math:linear-model-coeff Returns the coefficients of the linear model.
math:linear-model-intercept Returns the intercept of the linear model.
math:linear-model-rsquared 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:percent-rank Returns the rank of a value in a data set as a percentage of the data set.
math:percentile Returns a sequence of percentile(s) given a sequence of percentage(s).
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:stddev-p 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:variance-p Returns the population variance of a sequence of values.