round
relationalai.semantics.std.math
round(value: NumberValue, scale: NumberValue | None = None) -> ExpressionRound to a specified number of decimal places.
Parameters
(valueNumberValue) - The input value.
(scaleNumberValue|None, default:None) - Number of decimal places to round to. IfNone, rounds to the nearest integer. Default:None.
Returns
Expression- AnExpressioncomputing the rounded value. ReturnsNumberif the input isNumber, orFloatif the input isFloat.
Examples
Round to nearest integer:
select(math.round(Product.price))select(math.round(3.7))Round to two decimal places:
select(math.round(Product.price, 2))select(math.round(3.14159, 4))Referenced By
RelationalAI Documentation └── Release Notes └── Python API Release Notes └── What’s New in Version 1.0.17 └── New Features and Enhancements