## Interface MathExpr

• ```public interface MathExpr
```
Builds expressions to call functions in the math server library for a row pipeline.
• ### Method Summary

All Methods
Modifier and Type Method Description
`ServerExpression` `acos​(ServerExpression x)`
Returns the arc cosine of x, in radians, in the range from 0 to pi (inclusive).
`ServerExpression` `asin​(ServerExpression x)`
Returns the arc sine of x, in radians, in the range from -pi/2 to +pi/2 (inclusive).
`ServerExpression` `atan​(ServerExpression x)`
Returns the arc tangent of x, in radians.
`ServerExpression` ```atan2​(ServerExpression y, double x)```
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.
`ServerExpression` ```atan2​(ServerExpression y, ServerExpression x)```
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.
`ServerExpression` `ceil​(ServerExpression x)`
Returns the smallest integer greater than or equal to x.
`ServerExpression` `correlation​(ServerExpression arg)`
Returns the Pearson correlation coefficient of a data set.
`ServerExpression` `cos​(ServerExpression x)`
Returns the cosine of x, in the range from -1 to +1 (inclusive).
`ServerExpression` `cosh​(ServerExpression x)`
Returns the hyperbolic cosine of x.
`ServerExpression` `cot​(ServerExpression x)`
Returns the cotangent of x.
`ServerExpression` `covariance​(ServerExpression arg)`
Returns the sample covariance of a data set.
`ServerExpression` `covarianceP​(ServerExpression arg)`
Returns the population covariance of a data set.
`ServerExpression` `degrees​(ServerExpression x)`
Returns numeric expression converted from radians to degrees.
`ServerExpression` `exp​(ServerExpression x)`
Returns e (approximately 2.71828182845905) to the xth power.
`ServerExpression` `fabs​(ServerExpression x)`
Returns the absolute value of x.
`ServerExpression` `floor​(ServerExpression x)`
Returns the largest integer less than or equal to x.
`ServerExpression` ```fmod​(ServerExpression x, double y)```
Returns the remainder of x/y.
`ServerExpression` ```fmod​(ServerExpression x, ServerExpression y)```
Returns the remainder of x/y.
`ServerExpression` `frexp​(ServerExpression x)`
Returns x broken up into mantissa and exponent, where x = mantissa*2^exponent.
`ServerExpression` ```ldexp​(ServerExpression y, long i)```
Returns x*2^i.
`ServerExpression` ```ldexp​(ServerExpression y, ServerExpression i)```
Returns x*2^i.
`ServerExpression` `linearModel​(ServerExpression arg)`
Returns a linear model that fits the given data set.
`ServerExpression` `linearModelCoeff​(ServerExpression linearModel)`
Returns the coefficients of the linear model.
`ServerExpression` `linearModelIntercept​(ServerExpression linearModel)`
Returns the intercept of the linear model.
`ServerExpression` `linearModelRsquared​(ServerExpression linearModel)`
Returns the R^2 value of the linear model.
`ServerExpression` `log​(ServerExpression x)`
Returns the base-e logarithm of x.
`ServerExpression` `log10​(ServerExpression x)`
Returns the base-10 logarithm of x.
`ServerExpression` `median​(ServerExpression arg)`
Returns the median of a sequence of values.
`ServerExpression` `mode​(ServerExpression arg)`
Returns the mode of a sequence.
`ServerExpression` ```mode​(ServerExpression arg, ServerExpression options)```
Returns the mode of a sequence.
`ServerExpression` ```mode​(ServerExpression arg, java.lang.String options)```
Returns the mode of a sequence.
`ServerExpression` `modf​(ServerExpression x)`
Returns x broken up into fraction and integer.
`ServerExpression` ```percentile​(ServerExpression arg, double p)```
Returns a sequence of percentile(s) given a sequence of percentage(s).
`ServerExpression` ```percentile​(ServerExpression arg, ServerExpression p)```
Returns a sequence of percentile(s) given a sequence of percentage(s).
`ServerExpression` ```percentRank​(ServerExpression arg, ServerExpression value)```
Returns the rank of a value in a data set as a percentage of the data set.
`ServerExpression` ```percentRank​(ServerExpression arg, ServerExpression value, ServerExpression options)```
Returns the rank of a value in a data set as a percentage of the data set.
`ServerExpression` ```percentRank​(ServerExpression arg, java.lang.String value)```
Returns the rank of a value in a data set as a percentage of the data set.
`ServerExpression` ```percentRank​(ServerExpression arg, java.lang.String value, java.lang.String options)```
Returns the rank of a value in a data set as a percentage of the data set.
`ServerExpression` `pi​()`
Returns the value of pi.
`ServerExpression` ```pow​(ServerExpression x, double y)```
Returns x^y.
`ServerExpression` ```pow​(ServerExpression x, ServerExpression y)```
Returns x^y.
`ServerExpression` `radians​(ServerExpression x)`
Returns numeric expression converted from degrees to radians.
`ServerExpression` ```rank​(ServerExpression arg1, ServerExpression arg2)```
Returns the rank of a value in a data set.
`ServerExpression` ```rank​(ServerExpression arg1, ServerExpression arg2, ServerExpression options)```
Returns the rank of a value in a data set.
`ServerExpression` ```rank​(ServerExpression arg1, java.lang.String arg2)```
Returns the rank of a value in a data set.
`ServerExpression` ```rank​(ServerExpression arg1, java.lang.String arg2, java.lang.String options)```
Returns the rank of a value in a data set.
`ServerExpression` `sin​(ServerExpression x)`
Returns the sine of x, in the range from -1 to +1 (inclusive).
`ServerExpression` `sinh​(ServerExpression x)`
Returns the hyperbolic sine of x.
`ServerExpression` `sqrt​(ServerExpression x)`
Returns the square root of x.
`ServerExpression` `stddev​(ServerExpression arg)`
Returns the sample standard deviation of a sequence of values.
`ServerExpression` `stddevP​(ServerExpression arg)`
Returns the standard deviation of a population.
`ServerExpression` `tan​(ServerExpression x)`
Returns the tangent of x.
`ServerExpression` `tanh​(ServerExpression x)`
Returns the hyperbolic tangent of x, in the range from -1 to +1 (inclusive).
`ServerExpression` `trunc​(ServerExpression arg)`
Returns the number truncated to a certain number of decimal places.
`ServerExpression` ```trunc​(ServerExpression arg, long n)```
Returns the number truncated to a certain number of decimal places.
`ServerExpression` ```trunc​(ServerExpression arg, ServerExpression n)```
Returns the number truncated to a certain number of decimal places.
`ServerExpression` `variance​(ServerExpression arg)`
Returns the sample variance of a sequence of values.
`ServerExpression` `varianceP​(ServerExpression arg)`
Returns the population variance of a sequence of values.
• ### Method Detail

• #### acos

```ServerExpression acos​(ServerExpression x)
```
Returns the arc cosine of x, in radians, in the range from 0 to pi (inclusive).

Provides a client interface to the math:acos server function.

Parameters:
`x` - The fraction to be evaluated. Must be in the range of -1 to +1 (inclusive). (of xs:double)
Returns:
a server expression with the xs:double server data type
• #### asin

```ServerExpression asin​(ServerExpression x)
```
Returns the arc sine of x, in radians, in the range from -pi/2 to +pi/2 (inclusive).

Provides a client interface to the math:asin server function.

Parameters:
`x` - The fraction to be evaluated. Must be in the range of -1 to +1 (inclusive). (of xs:double)
Returns:
a server expression with the xs:double server data type
• #### atan

```ServerExpression atan​(ServerExpression x)
```
Returns the arc tangent of x, in radians. in the range from -pi/2 to +pi/2 (inclusive).

Provides a client interface to the math:atan server function.

Parameters:
`x` - The floating point number to be evaluated. (of xs:double)
Returns:
a server expression with the xs:double server data type
• #### atan2

```ServerExpression atan2​(ServerExpression y,
double x)
```
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.

Provides a client interface to the math:atan2 server function.

Parameters:
`y` - The floating point dividend. (of xs:double)
`x` - The floating point divisor. (of xs:double)
Returns:
a server expression with the xs:double server data type
• #### atan2

```ServerExpression atan2​(ServerExpression y,
ServerExpression x)
```
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.

Provides a client interface to the math:atan2 server function.

Parameters:
`y` - The floating point dividend. (of xs:double)
`x` - The floating point divisor. (of xs:double)
Returns:
a server expression with the xs:double server data type
• #### ceil

```ServerExpression ceil​(ServerExpression x)
```
Returns the smallest integer greater than or equal to x.

Provides a client interface to the math:ceil server function.

Parameters:
`x` - The floating point number to be evaluated. (of xs:double)
Returns:
a server expression with the xs:double server data type
• #### correlation

```ServerExpression correlation​(ServerExpression arg)
```
Returns the Pearson correlation coefficient of a data set. The size of the input array should be 2. The function eliminates all pairs for which either the first element or the second element is empty. After the elimination, if the length of the input is less than 2, the function returns the empty sequence. After the elimination, if the standard deviation of the first column or the standard deviation of the second column is 0, the function returns the empty sequence.

Provides a client interface to the math:correlation server function.

Parameters:
`arg` - The input data set. Each array should contain a pair of values. (of json:array)
Returns:
a server expression with the xs:double server data type
• #### cos

```ServerExpression cos​(ServerExpression x)
```
Returns the cosine of x, in the range from -1 to +1 (inclusive).

Provides a client interface to the math:cos server function.

Parameters:
`x` - The floating point number to be evaluated. (of xs:double)
Returns:
a server expression with the xs:double server data type
• #### cosh

```ServerExpression cosh​(ServerExpression x)
```
Returns the hyperbolic cosine of x.

Provides a client interface to the math:cosh server function.

Parameters:
`x` - The floating point number to be evaluated. (of xs:double)
Returns:
a server expression with the xs:double server data type
• #### cot

```ServerExpression cot​(ServerExpression x)
```
Returns the cotangent of x.

Provides a client interface to the math:cot server function.

Parameters:
`x` - The floating point number to be evaluated. (of xs:double)
Returns:
a server expression with the xs:double server data type
• #### covariance

```ServerExpression covariance​(ServerExpression arg)
```
Returns the sample covariance of a data set. The size of the input array should be 2. The function eliminates all pairs for which either the first element or the second element is empty. After the elimination, if the length of the input is less than 2, the function returns the empty sequence.

Provides a client interface to the math:covariance server function.

Parameters:
`arg` - The input data set. Each array should contain a pair of values. (of json:array)
Returns:
a server expression with the xs:double server data type
• #### covarianceP

```ServerExpression covarianceP​(ServerExpression arg)
```
Returns the population covariance of a data set. The size of the input array should be 2. The function eliminates all pairs for which either the first element or the second element is empty. After the elimination, if the length of the input is 0, the function returns the empty sequence.

Provides a client interface to the math:covariance-p server function.

Parameters:
`arg` - The input data set. Each array should contain a pair of values. (of json:array)
Returns:
a server expression with the xs:double server data type
• #### degrees

```ServerExpression degrees​(ServerExpression x)
```
Returns numeric expression converted from radians to degrees.

Provides a client interface to the math:degrees server function.

Parameters:
`x` - An angle expressed in radians. (of xs:double)
Returns:
a server expression with the xs:double server data type
• #### exp

```ServerExpression exp​(ServerExpression x)
```
Returns e (approximately 2.71828182845905) to the xth power.

Provides a client interface to the math:exp server function.

Parameters:
`x` - The exponent to be evaluated. (of xs:double)
Returns:
a server expression with the xs:double server data type
• #### fabs

```ServerExpression fabs​(ServerExpression x)
```
Returns the absolute value of x.

Provides a client interface to the math:fabs server function.

Parameters:
`x` - The floating point number to be evaluated. (of xs:double)
Returns:
a server expression with the xs:double server data type
• #### floor

```ServerExpression floor​(ServerExpression x)
```
Returns the largest integer less than or equal to x.

Provides a client interface to the math:floor server function.

Parameters:
`x` - The floating point number to be evaluated. (of xs:double)
Returns:
a server expression with the xs:double server data type
• #### fmod

```ServerExpression fmod​(ServerExpression x,
double y)
```
Returns the remainder of x/y.

Provides a client interface to the math:fmod server function.

Parameters:
`x` - The floating point dividend. (of xs:double)
`y` - The floating point divisor. (of xs:double)
Returns:
a server expression with the xs:double server data type
• #### fmod

```ServerExpression fmod​(ServerExpression x,
ServerExpression y)
```
Returns the remainder of x/y.

Provides a client interface to the math:fmod server function.

Parameters:
`x` - The floating point dividend. (of xs:double)
`y` - The floating point divisor. (of xs:double)
Returns:
a server expression with the xs:double server data type
• #### frexp

```ServerExpression frexp​(ServerExpression x)
```
Returns x broken up into mantissa and exponent, where x = mantissa*2^exponent.

Provides a client interface to the math:frexp server function.

Parameters:
`x` - The exponent to be evaluated. (of xs:double)
Returns:
a server expression with the item server data type
• #### ldexp

```ServerExpression ldexp​(ServerExpression y,
long i)
```
Returns x*2^i.

Provides a client interface to the math:ldexp server function.

Parameters:
`y` - The floating-point number to be multiplied. (of xs:double)
`i` - The exponent integer. (of xs:integer)
Returns:
a server expression with the xs:double server data type
• #### ldexp

```ServerExpression ldexp​(ServerExpression y,
ServerExpression i)
```
Returns x*2^i.

Provides a client interface to the math:ldexp server function.

Parameters:
`y` - The floating-point number to be multiplied. (of xs:double)
`i` - The exponent integer. (of xs:integer)
Returns:
a server expression with the xs:double server data type
• #### linearModel

```ServerExpression linearModel​(ServerExpression arg)
```
Returns a linear model that fits the given data set. The size of the input array should be 2, as currently only simple linear regression model is supported. The first element of the array should be the value of the dependent variable while the other element should be the value of the independent variable.

Provides a client interface to the math:linear-model server function.

Parameters:
`arg` - The input data set. Each array should contain a pair of values. (of json:array)
Returns:
a server expression with the math:linear-model server data type
• #### linearModelCoeff

```ServerExpression linearModelCoeff​(ServerExpression linearModel)
```
Returns the coefficients of the linear model. Currently only simple linear regression model is supported so the return should contain only one coefficient (also called "slope").

Provides a client interface to the math:linear-model-coeff server function.

Parameters:
`linearModel` - A linear model. (of math:linear-model)
Returns:
a server expression with the xs:double server data type
• #### linearModelIntercept

```ServerExpression linearModelIntercept​(ServerExpression linearModel)
```
Returns the intercept of the linear model.

Provides a client interface to the math:linear-model-intercept server function.

Parameters:
`linearModel` - A linear model. (of math:linear-model)
Returns:
a server expression with the xs:double server data type
• #### linearModelRsquared

```ServerExpression linearModelRsquared​(ServerExpression linearModel)
```
Returns the R^2 value of the linear model.

Provides a client interface to the math:linear-model-rsquared server function.

Parameters:
`linearModel` - A linear model. (of math:linear-model)
Returns:
a server expression with the xs:double server data type
• #### log

```ServerExpression log​(ServerExpression x)
```
Returns the base-e logarithm of x.

Provides a client interface to the math:log server function.

Parameters:
`x` - The floating point number to be evaluated. (of xs:double)
Returns:
a server expression with the xs:double server data type
• #### log10

```ServerExpression log10​(ServerExpression x)
```
Returns the base-10 logarithm of x.

Provides a client interface to the math:log10 server function.

Parameters:
`x` - The floating point number to be evaluated. (of xs:double)
Returns:
a server expression with the xs:double server data type
• #### median

```ServerExpression median​(ServerExpression arg)
```
Returns the median of a sequence of values. The function returns the empty sequence if the input is the empty sequence.

Provides a client interface to the math:median server function.

Parameters:
`arg` - The sequence of values. (of xs:double)
Returns:
a server expression with the xs:double server data type
• #### mode

```ServerExpression mode​(ServerExpression arg)
```
Returns the mode of a sequence. The mode is the value that occurs most frequently in a data set. If no value occurs more than once in the data set, the function returns the empty sequence. If the input is the empty sequence, the function returns the empty sequence.

Provides a client interface to the math:mode server function.

Parameters:
`arg` - The sequence of values. (of xs:anyAtomicType)
Returns:
a server expression with the xs:anyAtomicType server data type
• #### mode

```ServerExpression mode​(ServerExpression arg,
java.lang.String options)
```
Returns the mode of a sequence. The mode is the value that occurs most frequently in a data set. If no value occurs more than once in the data set, the function returns the empty sequence. If the input is the empty sequence, the function returns the empty sequence.

Provides a client interface to the math:mode server function.

Parameters:
`arg` - The sequence of values. (of xs:anyAtomicType)
`options` - Options. The default is (). Options include: "collation=URI" Applies only when \$arg is of the xs:string type. If no specified, the default collation is used. "coordinate-system=name" Applies only when \$arg is of the cts:point type. If no specified, the default coordinate system is used. (of xs:string)
Returns:
a server expression with the xs:anyAtomicType server data type
• #### mode

```ServerExpression mode​(ServerExpression arg,
ServerExpression options)
```
Returns the mode of a sequence. The mode is the value that occurs most frequently in a data set. If no value occurs more than once in the data set, the function returns the empty sequence. If the input is the empty sequence, the function returns the empty sequence.

Provides a client interface to the math:mode server function.

Parameters:
`arg` - The sequence of values. (of xs:anyAtomicType)
`options` - Options. The default is (). Options include: "collation=URI" Applies only when \$arg is of the xs:string type. If no specified, the default collation is used. "coordinate-system=name" Applies only when \$arg is of the cts:point type. If no specified, the default coordinate system is used. (of xs:string)
Returns:
a server expression with the xs:anyAtomicType server data type
• #### modf

```ServerExpression modf​(ServerExpression x)
```
Returns x broken up into fraction and integer. x = fraction+integer.

Provides a client interface to the math:modf server function.

Parameters:
`x` - The floating point number to be evaluated. (of xs:double)
Returns:
a server expression with the xs:double server data type
• #### percentRank

```ServerExpression percentRank​(ServerExpression arg,
java.lang.String value)
```
Returns the rank of a value in a data set as a percentage of the data set. If the given value is not equal to any item in the sequence, the function returns the empty sequence. See math:rank.

Provides a client interface to the math:percent-rank server function.

Parameters:
`arg` - The sequence of values. (of xs:anyAtomicType)
`value` - The value to be "ranked". (of xs:anyAtomicType)
Returns:
a server expression with the xs:double server data type
• #### percentRank

```ServerExpression percentRank​(ServerExpression arg,
ServerExpression value)
```
Returns the rank of a value in a data set as a percentage of the data set. If the given value is not equal to any item in the sequence, the function returns the empty sequence. See math:rank.

Provides a client interface to the math:percent-rank server function.

Parameters:
`arg` - The sequence of values. (of xs:anyAtomicType)
`value` - The value to be "ranked". (of xs:anyAtomicType)
Returns:
a server expression with the xs:double server data type
• #### percentRank

```ServerExpression percentRank​(ServerExpression arg,
java.lang.String value,
java.lang.String options)
```
Returns the rank of a value in a data set as a percentage of the data set. If the given value is not equal to any item in the sequence, the function returns the empty sequence. See math:rank.

Provides a client interface to the math:percent-rank server function.

Parameters:
`arg` - The sequence of values. (of xs:anyAtomicType)
`value` - The value to be "ranked". (of xs:anyAtomicType)
`options` - Options. The default is (). Options include: "ascending"(default) Rank the value as if the sequence was sorted in ascending order. "descending" Rank the value as if the sequence was sorted in descending order. "collation=URI" Applies only when \$arg is of the xs:string type. If no specified, the default collation is used. "coordinate-system=name" Applies only when \$arg is of the cts:point type. If no specified, the default coordinate system is used. (of xs:string)
Returns:
a server expression with the xs:double server data type
• #### percentRank

```ServerExpression percentRank​(ServerExpression arg,
ServerExpression value,
ServerExpression options)
```
Returns the rank of a value in a data set as a percentage of the data set. If the given value is not equal to any item in the sequence, the function returns the empty sequence. See math:rank.

Provides a client interface to the math:percent-rank server function.

Parameters:
`arg` - The sequence of values. (of xs:anyAtomicType)
`value` - The value to be "ranked". (of xs:anyAtomicType)
`options` - Options. The default is (). Options include: "ascending"(default) Rank the value as if the sequence was sorted in ascending order. "descending" Rank the value as if the sequence was sorted in descending order. "collation=URI" Applies only when \$arg is of the xs:string type. If no specified, the default collation is used. "coordinate-system=name" Applies only when \$arg is of the cts:point type. If no specified, the default coordinate system is used. (of xs:string)
Returns:
a server expression with the xs:double server data type
• #### percentile

```ServerExpression percentile​(ServerExpression arg,
double p)
```
Returns a sequence of percentile(s) given a sequence of percentage(s). The function returns the empty sequence if either arg or p is the empty sequence.

Provides a client interface to the math:percentile server function.

Parameters:
`arg` - The sequence of values to calculate the percentile(s) on. (of xs:double)
`p` - The sequence of percentage(s). (of xs:double)
Returns:
a server expression with the xs:double server data type
• #### percentile

```ServerExpression percentile​(ServerExpression arg,
ServerExpression p)
```
Returns a sequence of percentile(s) given a sequence of percentage(s). The function returns the empty sequence if either arg or p is the empty sequence.

Provides a client interface to the math:percentile server function.

Parameters:
`arg` - The sequence of values to calculate the percentile(s) on. (of xs:double)
`p` - The sequence of percentage(s). (of xs:double)
Returns:
a server expression with the xs:double server data type
• #### pi

```ServerExpression pi​()
```
Returns the value of pi.

Provides a client interface to the math:pi server function.

Returns:
a server expression with the xs:double server data type
• #### pow

```ServerExpression pow​(ServerExpression x,
double y)
```
Returns x^y.

Provides a client interface to the math:pow server function.

Parameters:
`x` - The floating-point base number. (of xs:double)
`y` - The exponent to be applied to x. (of xs:double)
Returns:
a server expression with the xs:double server data type
• #### pow

```ServerExpression pow​(ServerExpression x,
ServerExpression y)
```
Returns x^y.

Provides a client interface to the math:pow server function.

Parameters:
`x` - The floating-point base number. (of xs:double)
`y` - The exponent to be applied to x. (of xs:double)
Returns:
a server expression with the xs:double server data type

```ServerExpression radians​(ServerExpression x)
```
Returns numeric expression converted from degrees to radians.

Provides a client interface to the math:radians server function.

Parameters:
`x` - An angle expressed in degrees. (of xs:double)
Returns:
a server expression with the xs:double server data type
• #### rank

```ServerExpression rank​(ServerExpression arg1,
java.lang.String arg2)
```
Returns the rank of a value in a data set. Ranks are skipped in the event of ties. If the given value is not equal to any item in the sequence, the function returns the empty sequence. The function can be used on numeric values, xs:yearMonthDuration, xs:dayTimeDuration, xs:string, xs:anyURI, xs:date, xs:dateTime, xs:time, and cts:point.

Provides a client interface to the math:rank server function.

Parameters:
`arg1` - The sequence of values. (of xs:anyAtomicType)
`arg2` - The value to be "ranked". (of xs:anyAtomicType)
Returns:
a server expression with the xs:integer server data type
• #### rank

```ServerExpression rank​(ServerExpression arg1,
ServerExpression arg2)
```
Returns the rank of a value in a data set. Ranks are skipped in the event of ties. If the given value is not equal to any item in the sequence, the function returns the empty sequence. The function can be used on numeric values, xs:yearMonthDuration, xs:dayTimeDuration, xs:string, xs:anyURI, xs:date, xs:dateTime, xs:time, and cts:point.

Provides a client interface to the math:rank server function.

Parameters:
`arg1` - The sequence of values. (of xs:anyAtomicType)
`arg2` - The value to be "ranked". (of xs:anyAtomicType)
Returns:
a server expression with the xs:integer server data type
• #### rank

```ServerExpression rank​(ServerExpression arg1,
java.lang.String arg2,
java.lang.String options)
```
Returns the rank of a value in a data set. Ranks are skipped in the event of ties. If the given value is not equal to any item in the sequence, the function returns the empty sequence. The function can be used on numeric values, xs:yearMonthDuration, xs:dayTimeDuration, xs:string, xs:anyURI, xs:date, xs:dateTime, xs:time, and cts:point.

Provides a client interface to the math:rank server function.

Parameters:
`arg1` - The sequence of values. (of xs:anyAtomicType)
`arg2` - The value to be "ranked". (of xs:anyAtomicType)
`options` - Options. The default is (). Options include: "ascending"(default) Rank the value as if the sequence was sorted in ascending order. "descending" Rank the value as if the sequence was sorted in descending order. "collation=URI" Applies only when \$arg is of the xs:string type. If no specified, the default collation is used. "coordinate-system=name" Applies only when \$arg is of the cts:point type. If no specified, the default coordinate system is used. (of xs:string)
Returns:
a server expression with the xs:integer server data type
• #### rank

```ServerExpression rank​(ServerExpression arg1,
ServerExpression arg2,
ServerExpression options)
```
Returns the rank of a value in a data set. Ranks are skipped in the event of ties. If the given value is not equal to any item in the sequence, the function returns the empty sequence. The function can be used on numeric values, xs:yearMonthDuration, xs:dayTimeDuration, xs:string, xs:anyURI, xs:date, xs:dateTime, xs:time, and cts:point.

Provides a client interface to the math:rank server function.

Parameters:
`arg1` - The sequence of values. (of xs:anyAtomicType)
`arg2` - The value to be "ranked". (of xs:anyAtomicType)
`options` - Options. The default is (). Options include: "ascending"(default) Rank the value as if the sequence was sorted in ascending order. "descending" Rank the value as if the sequence was sorted in descending order. "collation=URI" Applies only when \$arg is of the xs:string type. If no specified, the default collation is used. "coordinate-system=name" Applies only when \$arg is of the cts:point type. If no specified, the default coordinate system is used. (of xs:string)
Returns:
a server expression with the xs:integer server data type
• #### sin

```ServerExpression sin​(ServerExpression x)
```
Returns the sine of x, in the range from -1 to +1 (inclusive).

Provides a client interface to the math:sin server function.

Parameters:
`x` - The floating point number to be evaluated. (of xs:double)
Returns:
a server expression with the xs:double server data type
• #### sinh

```ServerExpression sinh​(ServerExpression x)
```
Returns the hyperbolic sine of x.

Provides a client interface to the math:sinh server function.

Parameters:
`x` - The floating point number to be evaluated. (of xs:double)
Returns:
a server expression with the xs:double server data type
• #### sqrt

```ServerExpression sqrt​(ServerExpression x)
```
Returns the square root of x.

Provides a client interface to the math:sqrt server function.

Parameters:
`x` - The floating point number to be evaluated. (of xs:double)
Returns:
a server expression with the xs:double server data type
• #### stddev

```ServerExpression stddev​(ServerExpression arg)
```
Returns the sample standard deviation of a sequence of values. The function returns the empty sequence if the length of the input sequence is less than 2.

Provides a client interface to the math:stddev server function.

Parameters:
`arg` - The sequence of values. (of xs:double)
Returns:
a server expression with the xs:double server data type
• #### stddevP

```ServerExpression stddevP​(ServerExpression arg)
```
Returns the standard deviation of a population. The function returns the empty sequence if the input is the empty sequence.

Provides a client interface to the math:stddev-p server function.

Parameters:
`arg` - The sequence of values. (of xs:double)
Returns:
a server expression with the xs:double server data type
• #### tan

```ServerExpression tan​(ServerExpression x)
```
Returns the tangent of x.

Provides a client interface to the math:tan server function.

Parameters:
`x` - The floating point number to be evaluated. (of xs:double)
Returns:
a server expression with the xs:double server data type
• #### tanh

```ServerExpression tanh​(ServerExpression x)
```
Returns the hyperbolic tangent of x, in the range from -1 to +1 (inclusive).

Provides a client interface to the math:tanh server function.

Parameters:
`x` - The floating point number to be evaluated. (of xs:double)
Returns:
a server expression with the xs:double server data type
• #### trunc

```ServerExpression trunc​(ServerExpression arg)
```
Returns the number truncated to a certain number of decimal places. If type of arg is one of the four numeric types xs:float, xs:double, xs:decimal or xs:integer the type of the result is the same as the type of arg. If the type of arg is a type derived from one of the numeric types, the result is an instance of the base numeric type.

Provides a client interface to the math:trunc server function.

Parameters:
`arg` - A numeric value to truncate. (of xs:numeric)
Returns:
a server expression with the xs:numeric server data type
• #### trunc

```ServerExpression trunc​(ServerExpression arg,
long n)
```
Returns the number truncated to a certain number of decimal places. If type of arg is one of the four numeric types xs:float, xs:double, xs:decimal or xs:integer the type of the result is the same as the type of arg. If the type of arg is a type derived from one of the numeric types, the result is an instance of the base numeric type.

Provides a client interface to the math:trunc server function.

Parameters:
`arg` - A numeric value to truncate. (of xs:numeric)
`n` - The numbers of decimal places to truncate to. The default is 0. Negative values cause that many digits to the left of the decimal point to be truncated. (of xs:integer)
Returns:
a server expression with the xs:numeric server data type
• #### trunc

```ServerExpression trunc​(ServerExpression arg,
ServerExpression n)
```
Returns the number truncated to a certain number of decimal places. If type of arg is one of the four numeric types xs:float, xs:double, xs:decimal or xs:integer the type of the result is the same as the type of arg. If the type of arg is a type derived from one of the numeric types, the result is an instance of the base numeric type.

Provides a client interface to the math:trunc server function.

Parameters:
`arg` - A numeric value to truncate. (of xs:numeric)
`n` - The numbers of decimal places to truncate to. The default is 0. Negative values cause that many digits to the left of the decimal point to be truncated. (of xs:integer)
Returns:
a server expression with the xs:numeric server data type
• #### variance

```ServerExpression variance​(ServerExpression arg)
```
Returns the sample variance of a sequence of values. The function returns the empty sequence if the length of the input sequence is less than 2.

Provides a client interface to the math:variance server function.

Parameters:
`arg` - The sequence of values. (of xs:double)
Returns:
a server expression with the xs:double server data type
• #### varianceP

```ServerExpression varianceP​(ServerExpression arg)
```
Returns the population variance of a sequence of values. The function returns the empty sequence if the input is the empty sequence.

Provides a client interface to the math:variance-p server function.

Parameters:
`arg` - The sequence of values. (of xs:double)
Returns:
a server expression with the xs:double server data type