2 DOUBLE PRECISION FUNCTION DVNORM
(N
, V
, W
)
3 C***BEGIN PROLOGUE DVNORM
5 C***PURPOSE Weighted root-mean-square vector norm.
6 C***TYPE DOUBLE PRECISION (SVNORM-S, DVNORM-D)
7 C***AUTHOR Hindmarsh, Alan C., (LLNL)
10 C This function routine computes the weighted root-mean-square norm
11 C of the vector of length N contained in the array V, with weights
12 C contained in the array W of length N:
13 C DVNORM = SQRT( (1/N) * SUM( V(i)*W(i) )**2 )
16 C***ROUTINES CALLED (NONE)
17 C***REVISION HISTORY (YYMMDD)
19 C 890501 Modified prologue to SLATEC/LDOC format. (FNF)
20 C 890503 Minor cosmetic changes. (FNF)
21 C 930809 Renamed to allow single/double precision versions. (ACH)
22 C***END PROLOGUE DVNORM
25 DOUBLE PRECISION V
, W
, SUM
28 C***FIRST EXECUTABLE STATEMENT DVNORM
31 10 SUM
= SUM
+ (V
(I
)*W
(I
))**2
34 C----------------------- END OF FUNCTION DVNORM ------------------------