Skip to content

round

relationalai.semantics.std.math
round(value: NumberValue, scale: NumberValue | None = None) -> Expression

Round to a specified number of decimal places.

  • value

    (NumberValue) - The input value.
  • scale

    (NumberValue | None, default: None) - Number of decimal places to round to. If None, rounds to the nearest integer. Default: None.
  • Expression - An Expression computing the rounded value. Returns Number if the input is Number, or Float if the input is Float.

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))