diff --git a/base/psblas/psb_cnrm2.f90 b/base/psblas/psb_cnrm2.f90 index 02775037..0de8ed16 100644 --- a/base/psblas/psb_cnrm2.f90 +++ b/base/psblas/psb_cnrm2.f90 @@ -356,7 +356,7 @@ function psb_cnrm2_vect(x, desc_a, info,global) result(res) idx = desc_a%ovrlap_elem(i,1) ndm = desc_a%ovrlap_elem(i,2) dd = dble(ndm-1)/dble(ndm) - res = res - sqrt(cone - dd*(abs(x%v%v(idx))/res)**2) + res = res * sqrt(sone - dd*(abs(x%v%v(idx))/res)**2) end do end if else @@ -465,7 +465,7 @@ function psb_cnrm2_weight_vect(x,w, desc_a, info,global,aux) result(res) idx = desc_a%ovrlap_elem(i,1) ndm = desc_a%ovrlap_elem(i,2) dd = dble(ndm-1)/dble(ndm) - res = res - sqrt(cone - dd*(abs(x%v%v(idx))/res)**2) + res = res * sqrt(sone - dd*(abs(x%v%v(idx))/res)**2) end do end if else @@ -577,7 +577,7 @@ function psb_cnrm2_weightmask_vect(x,w,idv, desc_a, info,global, aux) result(re idx = desc_a%ovrlap_elem(i,1) ndm = desc_a%ovrlap_elem(i,2) dd = dble(ndm-1)/dble(ndm) - res = res - sqrt(cone - dd*(abs(x%v%v(idx))/res)**2) + res = res * sqrt(sone - dd*(abs(x%v%v(idx))/res)**2) end do end if else diff --git a/base/psblas/psb_dnrm2.f90 b/base/psblas/psb_dnrm2.f90 index 6985bcb4..7ebe9439 100644 --- a/base/psblas/psb_dnrm2.f90 +++ b/base/psblas/psb_dnrm2.f90 @@ -356,7 +356,7 @@ function psb_dnrm2_vect(x, desc_a, info,global) result(res) idx = desc_a%ovrlap_elem(i,1) ndm = desc_a%ovrlap_elem(i,2) dd = dble(ndm-1)/dble(ndm) - res = res - sqrt(done - dd*(abs(x%v%v(idx))/res)**2) + res = res * sqrt(done - dd*(abs(x%v%v(idx))/res)**2) end do end if else @@ -465,7 +465,7 @@ function psb_dnrm2_weight_vect(x,w, desc_a, info,global,aux) result(res) idx = desc_a%ovrlap_elem(i,1) ndm = desc_a%ovrlap_elem(i,2) dd = dble(ndm-1)/dble(ndm) - res = res - sqrt(done - dd*(abs(x%v%v(idx))/res)**2) + res = res * sqrt(done - dd*(abs(x%v%v(idx))/res)**2) end do end if else @@ -577,7 +577,7 @@ function psb_dnrm2_weightmask_vect(x,w,idv, desc_a, info,global, aux) result(re idx = desc_a%ovrlap_elem(i,1) ndm = desc_a%ovrlap_elem(i,2) dd = dble(ndm-1)/dble(ndm) - res = res - sqrt(done - dd*(abs(x%v%v(idx))/res)**2) + res = res * sqrt(done - dd*(abs(x%v%v(idx))/res)**2) end do end if else diff --git a/base/psblas/psb_snrm2.f90 b/base/psblas/psb_snrm2.f90 index d3cdaae2..bb9b3eff 100644 --- a/base/psblas/psb_snrm2.f90 +++ b/base/psblas/psb_snrm2.f90 @@ -356,7 +356,7 @@ function psb_snrm2_vect(x, desc_a, info,global) result(res) idx = desc_a%ovrlap_elem(i,1) ndm = desc_a%ovrlap_elem(i,2) dd = dble(ndm-1)/dble(ndm) - res = res - sqrt(sone - dd*(abs(x%v%v(idx))/res)**2) + res = res * sqrt(sone - dd*(abs(x%v%v(idx))/res)**2) end do end if else @@ -465,7 +465,7 @@ function psb_snrm2_weight_vect(x,w, desc_a, info,global,aux) result(res) idx = desc_a%ovrlap_elem(i,1) ndm = desc_a%ovrlap_elem(i,2) dd = dble(ndm-1)/dble(ndm) - res = res - sqrt(sone - dd*(abs(x%v%v(idx))/res)**2) + res = res * sqrt(sone - dd*(abs(x%v%v(idx))/res)**2) end do end if else @@ -577,7 +577,7 @@ function psb_snrm2_weightmask_vect(x,w,idv, desc_a, info,global, aux) result(re idx = desc_a%ovrlap_elem(i,1) ndm = desc_a%ovrlap_elem(i,2) dd = dble(ndm-1)/dble(ndm) - res = res - sqrt(sone - dd*(abs(x%v%v(idx))/res)**2) + res = res * sqrt(sone - dd*(abs(x%v%v(idx))/res)**2) end do end if else diff --git a/base/psblas/psb_znrm2.f90 b/base/psblas/psb_znrm2.f90 index afb54aec..5612a01d 100644 --- a/base/psblas/psb_znrm2.f90 +++ b/base/psblas/psb_znrm2.f90 @@ -356,7 +356,7 @@ function psb_znrm2_vect(x, desc_a, info,global) result(res) idx = desc_a%ovrlap_elem(i,1) ndm = desc_a%ovrlap_elem(i,2) dd = dble(ndm-1)/dble(ndm) - res = res - sqrt(zone - dd*(abs(x%v%v(idx))/res)**2) + res = res * sqrt(done - dd*(abs(x%v%v(idx))/res)**2) end do end if else @@ -465,7 +465,7 @@ function psb_znrm2_weight_vect(x,w, desc_a, info,global,aux) result(res) idx = desc_a%ovrlap_elem(i,1) ndm = desc_a%ovrlap_elem(i,2) dd = dble(ndm-1)/dble(ndm) - res = res - sqrt(zone - dd*(abs(x%v%v(idx))/res)**2) + res = res * sqrt(done - dd*(abs(x%v%v(idx))/res)**2) end do end if else @@ -577,7 +577,7 @@ function psb_znrm2_weightmask_vect(x,w,idv, desc_a, info,global, aux) result(re idx = desc_a%ovrlap_elem(i,1) ndm = desc_a%ovrlap_elem(i,2) dd = dble(ndm-1)/dble(ndm) - res = res - sqrt(zone - dd*(abs(x%v%v(idx))/res)**2) + res = res * sqrt(done - dd*(abs(x%v%v(idx))/res)**2) end do end if else