test mag_fac_ui and mag_rfac_ui