Function returning normalized vector and norm

By making v the result of some computations (e.g. a matvec A*x) which you do not want to repeat.
For example, norm_normalize() would allow you to reduce

v = A*x
n = norm(v)
v /= n

to

n,v = norm_normalize(A*x)