1      subroutine trbize(nmaxi,maxdeg,nzm,nzero,sm,zm,zzr,zzi)
2c!purpose
3c bilinear transformation of the zeros and the locations of the extrema
4c!
5c
6      implicit double precision (a-h,o-z)
7      dimension nzm(*)
8      dimension sm(maxdeg,*), nzero(*)
9      double precision zm(maxdeg,*), zzr(*), zzi(*)
10      external slamch, dlamch
11      real slamch
12c
13      flma=2.0d+0**(int(slamch('l'))-2)
14      flmi=2.0d+0*dlamch('p')
15      fa = 1.0d+0
16        do 50 j=1,4
17        me = nzm(j)
18        do 40 i=1,me
19          qi = sm(i,j)
20          zm(i,j) = 2.0d+0*atan(qi)
21          if (j.ne.4) go to 40
22          if (qi.ge.flma) go to 10
23          if (qi.lt.flmi) go to 20
24          qqi = qi*qi
25          q = 1.0d+0 + qqi
26          zzr(i) = (1.0d+0-qqi)/q
27          zzi(i) = 2.0d+0*qi/q
28          nu = nzero(i)/2
29          fa = fa*q**nu
30          go to 40
31c
32  10      zzr(i) = -1.0d+0
33          go to 30
34c
35  20      zzr(i) = 1.0d+0
36   30      zzi(i) = 0.0d+0
37  40    continue
38  50  continue
39c
40      sm(nmaxi-1,1) = fa
41      return
42      end
43