File: maxvec.f

package info (click to toggle)
x13as 1.1-B39-2
  • links: PTS, VCS
  • area: non-free
  • in suites: bullseye
  • size: 8,700 kB
  • sloc: fortran: 110,641; makefile: 14
file content (22 lines) | stat: -rw-r--r-- 938 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
      SUBROUTINE maxvec(Dx,N,Mxabvl)
c-----------------------------------------------------------------------
c     maxvec.f, Release 1, Subroutine Version 1.1, Modified 09 Feb 1995.
c-----------------------------------------------------------------------
c     Find maximum magnitude of double precision dx.
c-----------------------------------------------------------------------
      IMPLICIT NONE
      INTEGER i,N
      DOUBLE PRECISION Dx(*),Mxabvl,xmag
c     -----------------------------------------------------------------
      Mxabvl=0
      IF(N.le.0)RETURN
c-----------------------------------------------------------------------
c     Code for increments equal to 1.
c-----------------------------------------------------------------------
      DO i=1,N
       xmag=abs(Dx(i))
       IF(xmag.gt.Mxabvl)Mxabvl=xmag
      END DO
c     -----------------------------------------------------------------
      RETURN
      END