Cut uses the magnitude of the only unique value to set the sequence steps size for calculating breaks. This results in no unique breaks when that only unique value of x is 0.
*Steps to reproduce*
cut(rep(0L, 7), breaks = 3)
Like this: cut(rep(1L, 7), breaks = 3), but centered on 0 instead of 1.
Error in cut.default(rep(0L, 7), breaks = 3) : 'breaks' are not unique
The problem is that when the range of the data is zero, cut defines a sequence using the minimum of the data as the base for the step size.
dx <- abs(rx[1L])
breaks <- seq.int(rx[1L] - dx/1000, rx[2L] + dx/1000, length.out = nb)
Since dx = 0 when all(x == 0) the breaks will never be unique. It seems like there's no need to base the step size on the magnitude of the only value in x, just using 1/1000 would be sufficient.