Skip to content

functions_rounding.yaml

This document file is generated for functions_rounding.yaml

Scalar Functions

ceil

Implementations:
ceil(x): -> return_type
0. ceil(fp32): -> fp32
1. ceil(fp64): -> fp64

*Rounding to the ceiling of the value x. *

floor

Implementations:
floor(x): -> return_type
0. floor(fp32): -> fp32
1. floor(fp64): -> fp64

*Rounding to the floor of the value x. *

round

Implementations:
round(x, s, option:rounding): -> return_type

  • x: Numerical expression to be rounded.
  • s: Number of decimal places to be rounded to. When `s` is a positive number, nothing will happen since `x` is an integer value. When `s` is a negative number, the rounding is performed to the nearest multiple of `10^(-s)`.
  • 0. round(i8, i32, option:rounding): -> i8?
    1. round(i16, i32, option:rounding): -> i16?
    2. round(i32, i32, option:rounding): -> i32?
    3. round(i64, i32, option:rounding): -> i64?
    4. round(fp32, i32, option:rounding): -> fp32?
    5. round(fp64, i32, option:rounding): -> fp64?

    *Rounding the value x to s decimal places. *

    Options:
  • rounding ['TIE_TO_EVEN', 'TIE_AWAY_FROM_ZERO', 'TRUNCATE', 'CEILING', 'FLOOR', 'AWAY_FROM_ZERO', 'TIE_DOWN', 'TIE_UP', 'TIE_TOWARDS_ZERO', 'TIE_TO_ODD']