分段函数想起来都挺麻烦,边界情况容易混淆
⌊x⌋ 这个函数有不等式:
- ⌊x⌋<⌊x+1⌋
- ⌊x⌋≤x
合起来写作:
...<⌊x⌋<x<x+1≤⌊x+1⌋<x+2≤...
同样
- ⌈x⌉<⌈x+1⌉
- x<⌈x⌉≤x+1
合起来写作:
...≤x<⌈x⌉≤x+1<⌈x+1⌉≤x+2<...

实数轴可以看作一段段左闭右开区间 [0,1),[1,2)... 粘起来
⌊x⌋ 将 [n,n+1) 映射到 n, ⌈x⌉ 将 [n,n+1) 映射到 n+1,因此 ⌊x⌋+1=⌈x⌉
合起来写作:
...<x≤⌊x⌋<x+1≤⌊x+1⌋<x+2≤...