Any branch free code must contain a calculation of x * log(x)
to cover the "normal" case.
So, before trying to come up with that branch-free code, measure the speed of x * log(x)
alone. Unless it's significantly faster than the code you have, there's nothing significant to be gained here. And I suspect it won't be.