
floor向负无穷方向取整如floor(-1.1) -2; floor(1.9) 1; floor(1.1) 1; floor(-1.9) -2ceil向正无穷方向取整如ceil(-1.1) -1; ceil(1.9) 2; ceil(1.1) 2; ceil(-1.9) -1fix向零方向取整即正数和负数都向零方向靠拢如fix(-1.1) -1; fix(1.9) 1; fix(1.1) 1; fix(-1.9) -1round四舍五入到最近的整数0.5进位0.49舍去如round(-1.1) -1; round(1.5) 2; round(1.1) 1; round(-1.5) -2nearest相对round唯一区别是将负0.5舍去如nearest(-1.1) -1; nearest(1.5) 2; nearest(1.1) 1; nearest(-1.5) -1(1) nearest相比round操作实现更简单但可能引入固定偏差带来直流问题(2) 也称为伪round。nearest(x) floor(x0.5)。