# Mathematical functions

This page describes the additional set of predefined Jsonnet functions for the [Data Transformer Script](https://docs.cloud.google.com/application-integration/docs/configure-data-transformer-script-task.md.txt) task available in Application Integration.

### Before you begin


To use the following predefined functions, you must import the `functions` library in your script. Importing the `functions` library lets you use both the standard Jsonnet functions and the predefined **Data Transformer** functions.


Application Integration supports Jsonnet functions library v0.20.0. For information about the Jsonnet standard functions, see [Jsonnet Standard Library](https://jsonnet.org/ref/stdlib.html).

*** ** * ** ***

### `Is Decimal`

| Syntax | ```html isDecimal(num) ``` |
| Description | Checks if the given number is a decimal. |
| Input parameter | **num:** The input number. |
| Return type | `BOOLEAN` |
| Output | Returns **TRUE** if the number is a decimal and **FALSE** otherwise. |
|---|---|

*** ** * ** ***

### `Is Even`

| Syntax | ```html isEven(num) ``` |
| Description | Checks if the given number is even. |
| Input parameter | **num:** The input number. |
| Return type | `BOOLEAN` |
| Output | Returns **TRUE** if the number is even and **FALSE** otherwise. |
|---|---|

*** ** * ** ***

### `Is Integer`

| Syntax | ```html isInteger(num) ``` |
| Description | Checks if the given number is an integer. |
| Input parameter | **num:** The input number. |
| Return type | `BOOLEAN` |
| Output | Returns **TRUE** if the number is an integer and **FALSE** otherwise. |
|---|---|

*** ** * ** ***

### `Is Odd`

| Syntax | ```html isOdd(num) ``` |
| Description | Checks if the given number is odd. |
| Input parameter | **num:** The input number. |
| Return type | `BOOLEAN` |
| Output | Returns **TRUE** if the number is odd and **FALSE** otherwise. |
|---|---|

*** ** * ** ***

### `Random Number`

| Syntax | ```html randomNumber(lowerBound, upperBound) ``` |
| Description | Generates a random real number between a specified range. |
| Input parameter | **lowerBound:** Lower range value (inclusive). Default value is `0`. **upperBound:** Higher range value (exclusive). Default value is `1`. |
| Return type | A real number. |
| Output | Returns a random real number between `lowerBound` and `upperBound`. |
|---|---|

*** ** * ** ***

### `Round`

| Syntax | ```html round(input) ``` |
| Description | Rounds off a number to the nearest integer. |
| Input parameter | **input:** A value to round off. |
| Return type | `INTEGER` |
| Return value | Returns the nearest rounded off integer. |
|---|---|

## Recommendation

- Learn how to add and configure a [Data Transformer Script task](https://docs.cloud.google.com/application-integration/docs/configure-data-transformer-script-task.md.txt)