l2norm function

Calculate the L2 norm