3. implement rounding gap smoothing as in proposal 276

I have a branch for this, but it doesn't work yet.