Skip to main content

round (Function)

This function returns the value of the input argument rounded off to the closest integer/long value.

Syntax

<INT|LONG> math:round(<FLOAT|DOUBLE> p1)

Query Parameters

NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
p1The value that should be rounded off to the closest integer/long value.FLOAT DOUBLENoYes

Example 1

CREATE STREAM InValueStream (inValue double);

insert into OutMediationStream
select math:round(inValue) as roundValue
from InValueStream;

The function rounds off inValue1 to the closest int/long value and directs the output to the output stream, OutMediationStream. For example, round(3252.353) returns 3252.