faster numerical evaluation in ``choose_factor``