Modify trunc_geom_solver to circumvent the precision problem when upper_bound is high