Bb2 optimization

Optimization of the BB2 scheme.
I'm not clear this makes sense.

For a start, we don't want to evaluate `log2(0)` so the `y_max < 0` check isn't right.  But log gets very large as the argument approaches 0 from above, so even `y_max <= 0` may not be enough.  Is `y` some meaningful quantity?

Also, if the value is negative, why is it reset to above the largest possible value?

I wonder if clamping `y_min` and `y_max` to be `>= 1` makes more sense, or perhaps `>=` some small but positive number.