bugfix
precision for statistics to fit, not for threshold...
interpolate instead of using binary search
not sure it is better
change parameters
change precisions
abort second round if it is ensured to generate bad results
early abort during threshold search
allow to use different step sizes in the two rounds
apply sampling also for second round
more efficient implementation