Round

Top  Previous  Next

Data calculation expressions can contain a function that rounds the numerical result of an expression or term.  There are 2 variants of the rounding function.  The first (function.gms)

 

X=round(q);

X=round(12.432);

 

Rounds the result to the nearest integer value.

The second (function.gms)

 

X=round(q,z);

X=round(12.432,2);

 

rounds the result to the number of decimal points specified by the second argument.

This function may be used on data during GAMS calculations.  It cannot be used in models.