Annotation of researchv10no/cmd/view2d/num/isamax.f, revision 1.1.1.1

1.1       root        1:       integer function isamax(n,sx,incx)
                      2: c
                      3: c     finds the index of element having max. absolute value.
                      4: c     jack dongarra, linpack, 3/11/78.
                      5: c
                      6:       real sx(1),smax
                      7:       integer i,incx,ix,n
                      8: c
                      9:       isamax = 0
                     10:       if( n .lt. 1 ) return
                     11:       isamax = 1
                     12:       if(n.eq.1)return
                     13:       if(incx.eq.1)go to 20
                     14: c
                     15: c        code for increment not equal to 1
                     16: c
                     17:       ix = 1
                     18:       smax = abs(sx(1))
                     19:       ix = ix + incx
                     20:       do 10 i = 2,n
                     21:          if(abs(sx(ix)).le.smax) go to 5
                     22:          isamax = i
                     23:          smax = abs(sx(ix))
                     24:     5    ix = ix + incx
                     25:    10 continue
                     26:       return
                     27: c
                     28: c        code for increment equal to 1
                     29: c
                     30:    20 smax = abs(sx(1))
                     31:       do 30 i = 2,n
                     32:          if(abs(sx(i)).le.smax) go to 30
                     33:          isamax = i
                     34:          smax = abs(sx(i))
                     35:    30 continue
                     36:       return
                     37:       end

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.