There is no direct rounding function however this can be calculated by use of the INT function. The INT function is used to extract the integer part of the decimal, but does not round e.g.

```
* Make a number
gen1 x = 1.956780
* Extract Integer part
gen1 y = INT(x)
```

Output:

```
|_print x y
X
1.956780
Y
1.000000
```

To round to a specific number of decimal places do as follows:

```
* Make a number to round
gen1 x = 1.25678
* Define the number of dps as a rounding factor (3dps)
gen1 rnd = 0.001
* Round to the number of dps in the rounding factor
gen1 y = INT((x/rnd)+0.5) * rnd
```

Output:

```
|_print x y
X
1.256780
Y
1.257000
```

To round to 0 dps the rounding factor is 1

```
gen1 x = 1.55648
gen1 rnd = 1
gen1 y = int((x*rnd)+0.5) / rnd
print y
```

Output:

```
|_print y
Y
2.000000
```