mp_rational: implement ipow_subs.