add fmprb_inv and replace uses of fmprb_ui_div