1.floor向下取整(不超过X的最大整数,高斯取整, floor(-3.12) = -4)负无穷方向
K>> floor(4.9)
ans =
4
2.round四舍五入(C语言表示: double a = 3.15; c = (int)(a + 0.5) )
K>> round(1.4)
ans =
1
K>> round(1.5)
ans =
2
3.fix(x):截尾取整
K>>fix([3.12 -3.12])
ans =
3 -3
4.ceil(x) : 向上取整数,(正无穷)
>>ceil([3.12 -3.12])
ans =
4 -3