added error handling for intnegbinvariant log_sf