real(8) function norm(n, w)
real(8) w(n)

norm =maxval(dabs(w))
END function norm




