ceiling()ceiling()

计算大于或等于指定数值表达式的最小整数。Calculates the smallest integer greater than, or equal to, the specified numeric expression.

语法Syntax

ceiling(x)ceiling(x)

参数Arguments

  • x:一个实数。x: A real number.

返回Returns

  • 大于或等于指定数值表达式的最小整数。The smallest integer greater than, or equal to, the specified numeric expression.

示例Examples

print c1 = ceiling(-1.1), c2 = ceiling(0), c3 = ceiling(0.9)
c1c1 c2c2 c3c3
-1-1 00 11