Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer | :: | n | ||||
doubleprecision | :: | xr(*) | ||||
doubleprecision | :: | xi(*) | ||||
integer | :: | incx |
doubleprecision function mat_wnrm2(n,xr,xi,incx) integer :: n doubleprecision :: xr(*) doubleprecision :: xi(*) integer :: incx doubleprecision :: s integer :: ix integer :: i ! norm2(x) s = 0.0d0 if (n .gt. 0) then ix = 1 do i = 1, n s = mat_pythag(s,xr(ix)) s = mat_pythag(s,xi(ix)) ix = ix + incx enddo endif mat_wnrm2 = s end function mat_wnrm2