more code factorization

I don't really like the level unbalance in the handling of FP;
on the other hand, however, writing like that help to highlight
the common path.
Maybe it's bikeshedding, but I can't find a satisfying solution.
un-cripple a bit some magic numbers.