向上取整函数
- 更新时间2025-07-30
- 阅读时长2分钟
输入值向最近的最大整数取整。
例如,如输入为3.1,则结果为4。如输入为-3.1,则结果为-3。连线板显示该多态函数的默认数据类型。

输入/输出
x
—
x可以是标量数值、数值数组或簇、数值簇组成的数组等多种数据类型。
ceil(x): 最小整数 >= x
—
ceil(x):最小整数 >= x是最接近x的最大整数。如输入值为时间标识,函数可取整至下一秒。 When x is of the form x = a + bi, that is, when x is complex, the function returns a complex number defined by the next highest integers to the real and imaginary parts of x. The following equation defines ceil(x): 最小整数 >= x: ceil(x) = ceil(a) + i ceil(b) |
x
—
ceil(x): 最小整数 >= x
—