This is the commit for a fiz of the WxMaxima debug issue.
[maxima.git] / share / odepack / fortran / dfnorm.f
blob60df2cff07be24b5c04628014cc0c614468d520c
1 *DECK DFNORM
2 DOUBLE PRECISION FUNCTION DFNORM (N, A, W)
3 C-----------------------------------------------------------------------
4 C This function computes the norm of a full N by N matrix,
5 C stored in the array A, that is consistent with the weighted max-norm
6 C on vectors, with weights stored in the array W:
7 C DFNORM = MAX(i=1,...,N) ( W(i) * Sum(j=1,...,N) ABS(a(i,j))/W(j) )
8 C-----------------------------------------------------------------------
9 INTEGER N, I, J
10 DOUBLE PRECISION A, W, AN, SUM
11 DIMENSION A(N,N), W(N)
12 AN = 0.0D0
13 DO 20 I = 1,N
14 SUM = 0.0D0
15 DO 10 J = 1,N
16 10 SUM = SUM + ABS(A(I,J))/W(J)
17 AN = MAX(AN,SUM*W(I))
18 20 CONTINUE
19 DFNORM = AN
20 RETURN
21 C----------------------- End of Function DFNORM ------------------------
22 END