bea.com | products | dev2dev | support | askBEA
 Download Docs   Site Map   Glossary 
Search

Building Queries and Data Views

 Previous Next Contents Index View as PDF  

Numeric Functions

Numeric functions operate on numeric data types. The following numeric functions are available:

xf:ceiling

Returns the smallest (closest to negative infinity) integer that is not smaller than the source value.

Data Types

Notes

If the argument is an empty list, the function returns an empty list.

XQuery Specification Compliance

Conforms to the current specification.

Examples

 


xf:floor

Returns the largest (closest to positive infinity) integer that is not greater than the source value.

Data Types

Notes

If the argument is an empty list, the function returns an empty list.

XQuery Specification Compliance

Conforms to the current specification.

Examples

 


xf:round

Returns the integer that is closest to the source value.

Data Types

Notes

Round(x) produces the same result as the Floor function(x+0.5). If there are two such numbers, returns the one that is closest to +INF.

If the argument is +INF, returns +INF.

If the argument is -INF, returns -INF.

If the argument is +0, returns +0.

If the source value is an empty list, the function returns an empty list.

XQuery Specification Compliance

Liquid Data does not support not-a-number (NaN) or -0.

Examples

 


xfext:decimal-round

Returns a decimal value rounded to the specified precision (scale).

Data Types

Notes

The scale input is the precision with which to round the decimal input. A scale value of 1 rounds the input to tenths, a scale value of 2 rounds it to hundreths, and so on.

XQuery Specification Compliance

This is an extended function and is not part of the XQuery specification.

Examples

 


xfext:decimal-truncate

Returns a decimal value truncated to the specified precision (scale).

Data Types

Notes

The scale input is the precision with which to truncate the decimal input. A scale value of 1 truncates the input to tenths, a scale value of 2 truncates it to hundreths, and so on.

XQuery Specification Compliance

This is an extended function and is not part of the XQuery specification.

Examples

 

Back to Top Previous Next