UPDATED: faster frobius  and inf norms