A digit-by-digit algorithm for mth root extraction