      function     TXFIT   (x,m)
      dimension x(m)
      dimension xmin(10),xmax(10),scale(10),xmean(10)
      dimension coeff(  3)
      data ncoeff/  2/
      data avdat/ -0.2115378E-02/
      data xmin/
     1 -0.51549E+00, 0.00000E+00, 0.00000E+00, 0.00000E+00, 0.00000E+00,
     2  0.00000E+00, 0.00000E+00, 0.00000E+00, 0.00000E+00, 0.00000E+00/
      data xmax/
     1  0.45626E+00, 0.00000E+00, 0.00000E+00, 0.00000E+00, 0.00000E+00,
     2  0.00000E+00, 0.00000E+00, 0.00000E+00, 0.00000E+00, 0.00000E+00/
      data scale /10*0./
      data coeff/
     + -0.32374139E-02, 0.82964405E-01,
     +      0.      /
      data ientry/0/
c
      if (ientry.ne.0) go to 10
      ientry=1
      do 5 i=1,m
      if (xmin(i).eq.xmax(i)) go to 5
      scale(i)=2./(xmax(i)-xmin(i))
   5  continue
c
  10  continue
c      normalize variables between -1 and +1
      x1 =1.+(x(  1)-xmax(  1))*scale(  1)
c          set up monomials   functions
      x11 = x1
c
c                  function
c
          TXFIT   =avdat
     1  +coeff(  1)    
     2  +coeff(  2)*x11
c
      return
      end
      function delta       (x,m)
      dimension x(m)
      dimension xmin(10),xmax(10),scale(10),xmean(10)
      dimension coeff( 96)
      data ncoeff/ 95/
      data avdat/  0.4475296E-03/
      data xmin/
     1 -0.68689E+00,-0.26655E-01,-0.38595E-01,-0.35401E-01,-0.29995E-02,
     2  0.00000E+00, 0.00000E+00, 0.00000E+00, 0.00000E+00, 0.00000E+00/
      data xmax/
     1  0.59267E+00, 0.22221E-01, 0.41236E-01, 0.48763E-01, 0.29963E-02,
     2  0.00000E+00, 0.00000E+00, 0.00000E+00, 0.00000E+00, 0.00000E+00/
      data scale /10*0./
      data coeff/
     + -0.40798150E-02, 0.48659895E-01, 0.39100274E-02, 0.38898396E-02,
     +  0.12183431E-03,-0.14151847E-02, 0.49131707E-03,-0.79926132E-03,
     +  0.11916958E-02,-0.81846997E-03,-0.76903299E-04,-0.42224498E-02,
     +  0.35892071E-02, 0.28541038E-03, 0.38868349E-03, 0.84450589E-02,
     + -0.71964455E-02, 0.20409503E-03, 0.55986922E-03,-0.85711638E-02,
     +  0.11786999E-03, 0.28720181E-03, 0.36999915E-03, 0.12898949E-02,
     + -0.14443332E-02, 0.11668018E-03, 0.47539279E-03,-0.14757506E-02,
     + -0.59234924E-02, 0.87850373E-02,-0.49701133E-02, 0.63396903E-03,
     +  0.41366285E-02,-0.10638083E-03,-0.16061189E-03,-0.31779389E-03,
     +  0.51981222E-03, 0.16926993E-04, 0.16635686E-01,-0.11739515E-02,
     +  0.14556285E-02, 0.54619480E-02, 0.23594035E-02,-0.51868977E-02,
     + -0.66126446E-03,-0.37916661E-02, 0.10781738E-02,-0.12662446E-02,
     + -0.34071051E-02, 0.21793231E-03, 0.75331627E-03, 0.43192680E-03,
     +  0.83925005E-03,-0.12563330E-01, 0.41400708E-04, 0.64398475E-04,
     +  0.46230652E-02,-0.66463277E-02,-0.11476027E-01, 0.80596632E-03,
     +  0.11755890E-01,-0.40414990E-02, 0.21061127E-03,-0.70215750E-03,
     + -0.49872976E-03, 0.32775763E-02,-0.35685322E-02, 0.44264982E-03,
     +  0.27813292E-02, 0.34294063E-02, 0.42670327E-02,-0.21594488E-02,
     +  0.29926323E-02, 0.93834751E-04, 0.24428458E-02, 0.11650480E-02,
     + -0.13015253E-03,-0.43402350E-03, 0.91747567E-03, 0.13453661E-02,
     + -0.21335210E-02, 0.20095059E-02,-0.11206209E-02,-0.18508591E-02,
     +  0.43656237E-04,-0.21834861E-03, 0.48976382E-02,-0.42089974E-02,
     + -0.12295197E-03,-0.23686833E-04, 0.52217441E-04,-0.17706028E-03,
     +  0.19111299E-04, 0.19347150E-03, 0.14887300E-03,
     +      0.      /
      data ientry/0/
c
      if (ientry.ne.0) go to 10
      ientry=1
      do 5 i=1,m
      if (xmin(i).eq.xmax(i)) go to 5
      scale(i)=2./(xmax(i)-xmin(i))
   5  continue
c
  10  continue
c      normalize variables between -1 and +1
      x1 =1.+(x(  1)-xmax(  1))*scale(  1)
      x2 =1.+(x(  2)-xmax(  2))*scale(  2)
      x3 =1.+(x(  3)-xmax(  3))*scale(  3)
      x4 =1.+(x(  4)-xmax(  4))*scale(  4)
      x5 =1.+(x(  5)-xmax(  5))*scale(  5)
c          set up monomials   functions
      x11 = x1
      x12 = x11*x1
      x13 = x12*x1
      x14 = x13*x1
      x21 = x2
      x22 = x21*x2
      x23 = x22*x2
      x24 = x23*x2
      x25 = x24*x2
      x31 = x3
      x32 = x31*x3
      x33 = x32*x3
      x34 = x33*x3
      x41 = x4
      x42 = x41*x4
      x43 = x42*x4
      x44 = x43*x4
      x51 = x5
      x52 = x51*x5
c
c                  function
c
      delta       =avdat
     1  +coeff(  1)                    
     2  +coeff(  2)*x11                
     3  +coeff(  3)*x12                
     4  +coeff(  4)*x11*x21            
     5  +coeff(  5)    *x21            
     6  +coeff(  6)    *x22            
     7  +coeff(  7)                *x51
     8  +coeff(  8)    *x21    *x41    
      delta       =delta       
     9  +coeff(  9)        *x32        
     1  +coeff( 10)        *x31*x41    
     2  +coeff( 11)*x11*x21*x31        
     3  +coeff( 12)    *x21*x32        
     4  +coeff( 13)    *x21*x33        
     5  +coeff( 14)    *x21*x31        
     6  +coeff( 15)*x13                
     7  +coeff( 16)    *x21*x31*x41    
     8  +coeff( 17)    *x21    *x42    
      delta       =delta       
     9  +coeff( 18)            *x43    
     1  +coeff( 19)    *x24            
     2  +coeff( 20)    *x21    *x43    
     3  +coeff( 21)            *x41    
     4  +coeff( 22)            *x42    
     5  +coeff( 23)*x11*x22            
     6  +coeff( 24)    *x22*x31        
     7  +coeff( 25)    *x22    *x41    
     8  +coeff( 26)    *x21        *x51
      delta       =delta       
     9  +coeff( 27)    *x23    *x41    
     1  +coeff( 28)*x11*x21*x32        
     2  +coeff( 29)    *x22*x32        
     3  +coeff( 30)    *x22*x31*x41    
     4  +coeff( 31)    *x22    *x42    
     5  +coeff( 32)*x11*x23    *x41    
     6  +coeff( 33)    *x23    *x42    
     7  +coeff( 34)    *x25*x31        
     8  +coeff( 35)        *x31        
      delta       =delta       
     9  +coeff( 36)*x11*x21    *x41    
     1  +coeff( 37)*x11    *x31*x41    
     2  +coeff( 38)*x13    *x31        
     3  +coeff( 39)    *x21*x31*x42    
     4  +coeff( 40)    *x24*x31        
     5  +coeff( 41)    *x24    *x41    
     6  +coeff( 42)*x11*x21*x33        
     7  +coeff( 43)    *x23*x32*x41    
     8  +coeff( 44)    *x23*x31*x42    
      delta       =delta       
     9  +coeff( 45)    *x21*x34*x41    
     1  +coeff( 46)    *x25*x31*x41    
     2  +coeff( 47)*x12*x22*x33        
     3  +coeff( 48)    *x24*x33        
     4  +coeff( 49)*x11*x22*x34        
     5  +coeff( 50)*x13*x24    *x41    
     6  +coeff( 51)*x12*x21*x31        
     7  +coeff( 52)*x11*x22*x31        
     8  +coeff( 53)*x11*x21*x31*x41    
      delta       =delta       
     9  +coeff( 54)    *x21*x32*x41    
     1  +coeff( 55)*x11*x24            
     2  +coeff( 56)        *x32    *x51
     3  +coeff( 57)    *x22*x33        
     4  +coeff( 58)*x11*x21*x32*x41    
     5  +coeff( 59)    *x22*x32*x41    
     6  +coeff( 60)*x11*x21*x31*x42    
     7  +coeff( 61)    *x22*x31*x42    
     8  +coeff( 62)    *x22    *x43    
      delta       =delta       
     9  +coeff( 63)*x12*x24            
     1  +coeff( 64)*x12*x23*x31        
     2  +coeff( 65)*x11*x24*x31        
     3  +coeff( 66)    *x24*x32        
     4  +coeff( 67)    *x24*x31*x41    
     5  +coeff( 68)*x11*x23    *x42    
     6  +coeff( 69)    *x24    *x42    
     7  +coeff( 70)*x11*x22    *x43    
     8  +coeff( 71)    *x23    *x43    
      delta       =delta       
     9  +coeff( 72)*x11*x21*x34        
     1  +coeff( 73)*x11*x21*x33*x41    
     2  +coeff( 74)    *x22*x33*x41    
     3  +coeff( 75)    *x22*x32*x42    
     4  +coeff( 76)*x11*x21    *x44    
     5  +coeff( 77)*x11*x25*x31        
     6  +coeff( 78)*x14*x21*x32        
     7  +coeff( 79)*x13*x22    *x42    
     8  +coeff( 80)*x11*x24    *x42    
      delta       =delta       
     9  +coeff( 81)*x11*x23*x33        
     1  +coeff( 82)*x11*x23    *x43    
     2  +coeff( 83)*x12*x21*x34        
     3  +coeff( 84)*x12*x21*x32*x42    
     4  +coeff( 85)    *x23        *x52
     5  +coeff( 86)*x11*x21    *x41*x52
     6  +coeff( 87)*x11*x24*x33        
     7  +coeff( 88)*x11*x24*x32*x41    
     8  +coeff( 89)    *x25        *x52
      delta       =delta       
     9  +coeff( 90)*x11    *x31        
     1  +coeff( 91)*x12*x21            
     2  +coeff( 92)    *x23            
     3  +coeff( 93)*x11            *x51
     4  +coeff( 94)*x12        *x42    
     5  +coeff( 95)*x11    *x33        
c
      return
      end
      function theta       (x,m)
      dimension x(m)
      dimension xmin(10),xmax(10),scale(10),xmean(10)
      dimension coeff( 96)
      data ncoeff/ 95/
      data avdat/ -0.4736325E-03/
      data xmin/
     1 -0.68689E+00,-0.26655E-01,-0.38595E-01,-0.35401E-01,-0.29995E-02,
     2  0.00000E+00, 0.00000E+00, 0.00000E+00, 0.00000E+00, 0.00000E+00/
      data xmax/
     1  0.59267E+00, 0.22221E-01, 0.41236E-01, 0.48763E-01, 0.29963E-02,
     2  0.00000E+00, 0.00000E+00, 0.00000E+00, 0.00000E+00, 0.00000E+00/
      data scale /10*0./
      data coeff/
     +  0.57823709E-02,-0.28996548E-03,-0.50436687E-01, 0.58221649E-02,
     + -0.35453807E-02,-0.19349828E-02, 0.18301271E-02,-0.83102212E-04,
     +  0.46329424E-03, 0.10429656E-02, 0.13400066E-02,-0.18047468E-02,
     +  0.62276949E-02,-0.24818704E-01, 0.57498671E-01,-0.36291249E-01,
     +  0.38632716E-03,-0.16042101E-02,-0.57682656E-01, 0.39784922E-02,
     + -0.29433991E-02, 0.11630022E-02,-0.87621594E-02,-0.26741652E-01,
     +  0.43250572E-01,-0.21491388E-01, 0.86794011E-02, 0.29449733E-01,
     +  0.36677167E-01, 0.15147331E-02,-0.20269305E-02, 0.14157536E-02,
     +  0.25062947E-01, 0.40610405E-03,-0.91943376E-01, 0.57968980E-03,
     + -0.11136585E-02, 0.11984423E+00,-0.61969431E-02,-0.34922145E-02,
     +  0.20437839E-01, 0.27722735E-01,-0.39236583E-01,-0.29346047E-01,
     + -0.58719460E-01,-0.75863313E-03, 0.10982665E-02, 0.56742728E-01,
     + -0.15708938E-01, 0.18051960E-01,-0.15893225E-01,-0.34187469E-03,
     +  0.50850008E-02,-0.70611224E-01, 0.23590704E-01, 0.16928878E-01,
     +  0.37141759E-02,-0.98975124E-02, 0.48283627E-02,-0.69168117E-03,
     +  0.99051488E-03,-0.30110695E-03,-0.25999870E-02,-0.81350692E-02,
     + -0.95962308E-03, 0.62381354E-03, 0.21484443E-03, 0.56325267E-02,
     + -0.10708559E-02,-0.30977728E-02, 0.13248745E-01, 0.84378349E-03,
     +  0.80948919E-02,-0.10026952E-02, 0.98119089E-02, 0.13208616E-01,
     + -0.40793498E-02,-0.13560737E-01,-0.19184257E-03, 0.81154640E-03,
     +  0.27294660E-02, 0.12403462E-01,-0.75076031E-02,-0.24738641E-01,
     +  0.52081041E-01,-0.43515475E-02, 0.14689627E-01,-0.25100132E-01,
     + -0.46391073E-02, 0.29451461E-03,-0.10475441E-01,-0.88925418E-02,
     +  0.84551098E-02, 0.21863768E-02, 0.20456674E-03,
     +      0.      /
      data ientry/0/
c
      if (ientry.ne.0) go to 10
      ientry=1
      do 5 i=1,m
      if (xmin(i).eq.xmax(i)) go to 5
      scale(i)=2./(xmax(i)-xmin(i))
   5  continue
c
  10  continue
c      normalize variables between -1 and +1
      x1 =1.+(x(  1)-xmax(  1))*scale(  1)
      x2 =1.+(x(  2)-xmax(  2))*scale(  2)
      x3 =1.+(x(  3)-xmax(  3))*scale(  3)
      x4 =1.+(x(  4)-xmax(  4))*scale(  4)
      x5 =1.+(x(  5)-xmax(  5))*scale(  5)
c          set up monomials   functions
      x11 = x1
      x12 = x11*x1
      x13 = x12*x1
      x14 = x13*x1
      x21 = x2
      x22 = x21*x2
      x23 = x22*x2
      x24 = x23*x2
      x31 = x3
      x32 = x31*x3
      x33 = x32*x3
      x34 = x33*x3
      x41 = x4
      x42 = x41*x4
      x43 = x42*x4
      x44 = x43*x4
      x51 = x5
c
c                  function
c
      theta       =avdat
     1  +coeff(  1)                    
     2  +coeff(  2)*x11                
     3  +coeff(  3)    *x21            
     4  +coeff(  4)*x11*x21            
     5  +coeff(  5)    *x22            
     6  +coeff(  6)    *x21    *x41    
     7  +coeff(  7)*x11*x21*x31        
     8  +coeff(  8)*x14                
      theta       =theta       
     9  +coeff(  9)    *x23*x31        
     1  +coeff( 10)                *x51
     2  +coeff( 11)    *x21*x31        
     3  +coeff( 12)    *x23            
     4  +coeff( 13)    *x22*x31        
     5  +coeff( 14)    *x21*x32        
     6  +coeff( 15)    *x21*x31*x41    
     7  +coeff( 16)    *x21    *x42    
     8  +coeff( 17)    *x23    *x41    
      theta       =theta       
     9  +coeff( 18)*x11*x21    *x42    
     1  +coeff( 19)    *x21    *x43    
     2  +coeff( 20)*x11*x23    *x41    
     3  +coeff( 21)*x12                
     4  +coeff( 22)*x11*x22            
     5  +coeff( 23)*x11*x21*x32        
     6  +coeff( 24)    *x22*x32        
     7  +coeff( 25)    *x22*x31*x41    
     8  +coeff( 26)    *x22    *x42    
      theta       =theta       
     9  +coeff( 27)    *x24    *x41    
     1  +coeff( 28)    *x23    *x42    
     2  +coeff( 29)    *x23    *x43    
     3  +coeff( 30)        *x32        
     4  +coeff( 31)*x11*x21    *x41    
     5  +coeff( 32)*x11*x23            
     6  +coeff( 33)    *x21*x33        
     7  +coeff( 34)*x11    *x32*x41    
     8  +coeff( 35)    *x21*x32*x41    
      theta       =theta       
     9  +coeff( 36)*x12        *x42    
     1  +coeff( 37)*x11    *x31*x42    
     2  +coeff( 38)    *x21*x31*x42    
     3  +coeff( 39)    *x24*x31        
     4  +coeff( 40)*x12*x21*x32        
     5  +coeff( 41)*x11*x21*x33        
     6  +coeff( 42)    *x22*x33        
     7  +coeff( 43)    *x23*x31*x41    
     8  +coeff( 44)*x11*x21*x32*x41    
      theta       =theta       
     9  +coeff( 45)    *x22*x32*x41    
     1  +coeff( 46)*x12    *x31*x42    
     2  +coeff( 47)*x11*x21*x31*x42    
     3  +coeff( 48)    *x22*x31*x42    
     4  +coeff( 49)    *x22    *x43    
     5  +coeff( 50)    *x24*x32        
     6  +coeff( 51)    *x23*x33        
     7  +coeff( 52)*x14*x21    *x41    
     8  +coeff( 53)*x11*x23*x31*x41    
      theta       =theta       
     9  +coeff( 54)    *x23*x31*x42    
     1  +coeff( 55)*x11*x22    *x43    
     2  +coeff( 56)*x11*x21    *x44    
     3  +coeff( 57)*x12*x23*x32        
     4  +coeff( 58)*x11*x24*x32        
     5  +coeff( 59)*x13*x22    *x42    
     6  +coeff( 60)        *x31        
     7  +coeff( 61)            *x41    
     8  +coeff( 62)*x11    *x31        
      theta       =theta       
     9  +coeff( 63)        *x31*x41    
     1  +coeff( 64)    *x22    *x41    
     2  +coeff( 65)*x12*x22            
     3  +coeff( 66)*x11*x22*x31        
     4  +coeff( 67)*x11    *x33        
     5  +coeff( 68)*x11*x21*x31*x41    
     6  +coeff( 69)*x14*x21            
     7  +coeff( 70)*x11*x23*x31        
     8  +coeff( 71)    *x23*x32        
      theta       =theta       
     9  +coeff( 72)*x12    *x32*x41    
     1  +coeff( 73)*x11*x22    *x42    
     2  +coeff( 74)*x12        *x43    
     3  +coeff( 75)*x11*x21    *x43    
     4  +coeff( 76)    *x21*x31*x43    
     5  +coeff( 77)*x11        *x44    
     6  +coeff( 78)    *x21    *x44    
     7  +coeff( 79)*x11            *x51
     8  +coeff( 80)*x12*x24            
      theta       =theta       
     9  +coeff( 81)*x12*x21*x33        
     1  +coeff( 82)*x11*x22*x33        
     2  +coeff( 83)*x11*x21*x34        
     3  +coeff( 84)    *x24*x31*x41    
     4  +coeff( 85)    *x23*x32*x41    
     5  +coeff( 86)*x12    *x33*x41    
     6  +coeff( 87)    *x24    *x42    
     7  +coeff( 88)*x11*x22*x31*x42    
     8  +coeff( 89)*x11    *x33*x42    
      theta       =theta       
     9  +coeff( 90)        *x32    *x51
     1  +coeff( 91)    *x24*x33        
     2  +coeff( 92)*x13*x22*x31*x41    
     3  +coeff( 93)*x14*x21*x33        
     4  +coeff( 94)            *x42    
     5  +coeff( 95)*x13                
c
      return
      end
      function phi         (x,m)
      dimension x(m)
      dimension xmin(10),xmax(10),scale(10),xmean(10)
      dimension coeff( 96)
      data ncoeff/ 95/
      data avdat/  0.1365134E-02/
      data xmin/
     1 -0.68689E+00,-0.26655E-01,-0.38595E-01,-0.35401E-01,-0.29995E-02,
     2  0.00000E+00, 0.00000E+00, 0.00000E+00, 0.00000E+00, 0.00000E+00/
      data xmax/
     1  0.59267E+00, 0.22221E-01, 0.41236E-01, 0.48763E-01, 0.29963E-02,
     2  0.00000E+00, 0.00000E+00, 0.00000E+00, 0.00000E+00, 0.00000E+00/
      data scale /10*0./
      data coeff/
     + -0.29925036E-02,-0.27811905E-01,-0.72180917E-02,-0.87689925E-02,
     + -0.11133412E-01, 0.10335488E-01, 0.88184066E-02,-0.12113798E-01,
     +  0.71258945E-02, 0.30031614E-02,-0.67356922E-01, 0.41713603E-01,
     + -0.96369266E-04,-0.19498043E-01, 0.17799150E-01,-0.99476697E-02,
     +  0.12659715E-01, 0.16588999E-01,-0.17416385E-02, 0.38320519E-01,
     +  0.22906484E-02, 0.32808941E-01,-0.38704716E-01, 0.23665778E-01,
     +  0.11661371E-01, 0.20144092E-01, 0.37485003E-03, 0.25828404E-01,
     + -0.28377136E-02, 0.16891286E-02,-0.45356005E-02,-0.72357780E-03,
     + -0.35774936E-02,-0.19025636E-02,-0.46310719E-03, 0.49362560E-02,
     + -0.25304973E-02,-0.95992172E-02, 0.83999691E-03, 0.35426305E-02,
     + -0.22831026E-01, 0.43425120E-01,-0.14358609E-01, 0.70718154E-01,
     +  0.12000022E-02, 0.11589765E-01,-0.19745615E-02,-0.43555841E-01,
     +  0.31837143E-02, 0.12289437E-02,-0.81703201E-03,-0.66421214E-02,
     + -0.54834567E-01,-0.90169646E-02, 0.30919615E-01,-0.43456823E-01,
     +  0.82219988E-02, 0.21114390E-01, 0.34755253E-03,-0.20860638E-02,
     + -0.77793696E-02, 0.12658595E-01, 0.30468281E-01,-0.31294890E-01,
     +  0.64034429E-02, 0.25801329E-01,-0.33897582E-01, 0.23578109E-01,
     + -0.45397248E-01,-0.12592717E-01, 0.18965153E-01,-0.66490336E-02,
     +  0.64613395E-02,-0.35649642E-01, 0.77509366E-01,-0.44296712E-01,
     + -0.68699208E-03,-0.12184520E-01,-0.67095228E-01,-0.11272404E-01,
     + -0.20065390E-01, 0.90609770E-02, 0.11948322E-01,-0.14733128E-01,
     + -0.82467683E-02,-0.13072086E-01,-0.21816485E-01, 0.65323724E-02,
     + -0.37927851E-01, 0.15762132E-01,-0.82833264E-02, 0.11888924E-01,
     + -0.41960910E-01,-0.43699306E-01,-0.25983786E-01,
     +      0.      /
      data ientry/0/
c
      if (ientry.ne.0) go to 10
      ientry=1
      do 5 i=1,m
      if (xmin(i).eq.xmax(i)) go to 5
      scale(i)=2./(xmax(i)-xmin(i))
   5  continue
c
  10  continue
c      normalize variables between -1 and +1
      x1 =1.+(x(  1)-xmax(  1))*scale(  1)
      x2 =1.+(x(  2)-xmax(  2))*scale(  2)
      x3 =1.+(x(  3)-xmax(  3))*scale(  3)
      x4 =1.+(x(  4)-xmax(  4))*scale(  4)
      x5 =1.+(x(  5)-xmax(  5))*scale(  5)
c          set up monomials   functions
      x11 = x1
      x12 = x11*x1
      x13 = x12*x1
      x21 = x2
      x22 = x21*x2
      x23 = x22*x2
      x24 = x23*x2
      x31 = x3
      x32 = x31*x3
      x33 = x32*x3
      x34 = x33*x3
      x35 = x34*x3
      x41 = x4
      x42 = x41*x4
      x43 = x42*x4
      x44 = x43*x4
      x45 = x44*x4
      x51 = x5
c
c                  function
c
      phi         =avdat
     1  +coeff(  1)                    
     2  +coeff(  2)        *x31        
     3  +coeff(  3)            *x41    
     4  +coeff(  4)*x11                
     5  +coeff(  5)        *x31*x41    
     6  +coeff(  6)            *x42    
     7  +coeff(  7)*x11    *x31        
     8  +coeff(  8)*x11        *x41    
      phi         =phi         
     9  +coeff(  9)    *x21    *x41    
     1  +coeff( 10)    *x22            
     2  +coeff( 11)        *x31*x42    
     3  +coeff( 12)            *x43    
     4  +coeff( 13)    *x21*x32        
     5  +coeff( 14)*x11    *x31*x41    
     6  +coeff( 15)*x11        *x42    
     7  +coeff( 16)    *x22*x31        
     8  +coeff( 17)*x12        *x41    
      phi         =phi         
     9  +coeff( 18)    *x22    *x41    
     1  +coeff( 19)        *x34        
     2  +coeff( 20)            *x44    
     3  +coeff( 21)*x12    *x32        
     4  +coeff( 22)    *x22*x32        
     5  +coeff( 23)    *x22*x31*x41    
     6  +coeff( 24)    *x22    *x42    
     7  +coeff( 25)*x11    *x34        
     8  +coeff( 26)        *x34*x42    
      phi         =phi         
     9  +coeff( 27)    *x21            
     1  +coeff( 28)        *x32*x41    
     2  +coeff( 29)    *x21*x31*x41    
     3  +coeff( 30)    *x21    *x42    
     4  +coeff( 31)*x12    *x31        
     5  +coeff( 32)*x11*x21*x31        
     6  +coeff( 33)*x11*x21    *x41    
     7  +coeff( 34)*x11*x22            
     8  +coeff( 35)    *x23            
      phi         =phi         
     9  +coeff( 36)*x11*x21*x32        
     1  +coeff( 37)*x12    *x31*x41    
     2  +coeff( 38)*x11*x22    *x41    
     3  +coeff( 39)    *x24            
     4  +coeff( 40)        *x35        
     5  +coeff( 41)    *x22*x33        
     6  +coeff( 42)    *x22*x32*x41    
     7  +coeff( 43)    *x23*x33        
     8  +coeff( 44)    *x23*x32*x41    
      phi         =phi         
     9  +coeff( 45)*x11*x22*x31*x42    
     1  +coeff( 46)*x13*x22*x32        
     2  +coeff( 47)    *x21*x32    *x51
     3  +coeff( 48)*x12*x22*x31*x43    
     4  +coeff( 49)        *x32        
     5  +coeff( 50)*x12                
     6  +coeff( 51)*x11*x21            
     7  +coeff( 52)        *x33        
     8  +coeff( 53)        *x31*x43    
      phi         =phi         
     9  +coeff( 54)*x11    *x33        
     1  +coeff( 55)*x11    *x32*x41    
     2  +coeff( 56)*x11    *x31*x42    
     3  +coeff( 57)    *x21*x31*x42    
     4  +coeff( 58)*x11        *x43    
     5  +coeff( 59)*x11*x22*x31        
     6  +coeff( 60)    *x23*x31        
     7  +coeff( 61)        *x34*x41    
     8  +coeff( 62)        *x33*x42    
      phi         =phi         
     9  +coeff( 63)*x11    *x32*x42    
     1  +coeff( 64)*x11        *x44    
     2  +coeff( 65)*x12    *x32*x41    
     3  +coeff( 66)*x12    *x31*x42    
     4  +coeff( 67)*x12        *x43    
     5  +coeff( 68)    *x23*x32        
     6  +coeff( 69)    *x23*x31*x41    
     7  +coeff( 70)*x12*x21    *x42    
     8  +coeff( 71)    *x23    *x42    
      phi         =phi         
     9  +coeff( 72)    *x24    *x41    
     1  +coeff( 73)    *x21*x35        
     2  +coeff( 74)*x11        *x45    
     3  +coeff( 75)    *x22*x32*x42    
     4  +coeff( 76)*x12        *x44    
     5  +coeff( 77)*x13    *x33        
     6  +coeff( 78)*x13    *x32*x41    
     7  +coeff( 79)    *x23*x31*x42    
     8  +coeff( 80)*x13        *x43    
      phi         =phi         
     9  +coeff( 81)*x12*x21    *x43    
     1  +coeff( 82)*x11*x22    *x43    
     2  +coeff( 83)    *x23    *x43    
     3  +coeff( 84)    *x24*x32        
     4  +coeff( 85)*x11*x23    *x42    
     5  +coeff( 86)    *x24    *x42    
     6  +coeff( 87)*x11    *x35*x41    
     7  +coeff( 88)    *x23*x32*x42    
     8  +coeff( 89)*x11*x23*x31*x42    
      phi         =phi         
     9  +coeff( 90)*x13*x22*x31*x41    
     1  +coeff( 91)*x11*x24    *x42    
     2  +coeff( 92)*x11*x21*x35*x41    
     3  +coeff( 93)    *x22*x35*x41    
     4  +coeff( 94)    *x22*x32*x44    
     5  +coeff( 95)    *x23*x35        
c
      return
      end
      function y00         (x,m)
      dimension x(m)
      dimension xmin(10),xmax(10),scale(10),xmean(10)
      dimension coeff( 96)
      data ncoeff/ 95/
      data avdat/ -0.6949954E-04/
      data xmin/
     1 -0.68689E+00,-0.26655E-01,-0.38595E-01,-0.35401E-01,-0.29995E-02,
     2  0.00000E+00, 0.00000E+00, 0.00000E+00, 0.00000E+00, 0.00000E+00/
      data xmax/
     1  0.59267E+00, 0.22221E-01, 0.41236E-01, 0.48763E-01, 0.29963E-02,
     2  0.00000E+00, 0.00000E+00, 0.00000E+00, 0.00000E+00, 0.00000E+00/
      data scale /10*0./
      data coeff/
     +  0.82146684E-02,-0.48846849E-02, 0.59751749E-01, 0.13160368E-01,
     +  0.93627319E-03, 0.15922912E-02, 0.34363759E-02,-0.12840607E-01,
     + -0.25907174E-01,-0.25326421E-01, 0.97900571E-03, 0.57847421E-02,
     +  0.29678040E-03,-0.49139196E-02,-0.43266647E-01, 0.81038818E-01,
     + -0.67312025E-01,-0.45582210E-02, 0.20115376E-01, 0.19764325E-01,
     + -0.29310595E-01, 0.22598159E-01,-0.15826868E-01,-0.48962394E-02,
     + -0.15744608E-01,-0.14026048E-01, 0.56119118E-01,-0.62874489E-01,
     + -0.54499436E-01,-0.22273676E-01,-0.20367494E-02,-0.56675896E-01,
     +  0.86504012E-01, 0.15217217E-01,-0.23305010E-01, 0.96534472E-02,
     + -0.17121857E-02, 0.29437488E-01,-0.13241079E-02, 0.29433236E-03,
     +  0.64028972E-02,-0.94420137E-02,-0.11692526E-01, 0.34292717E-02,
     +  0.45053311E-01, 0.12786195E-01,-0.93951881E-01,-0.41128334E-01,
     +  0.56559276E-01,-0.38883880E-01,-0.71381032E-01, 0.94256140E-01,
     +  0.86556427E-01,-0.11015845E-01,-0.55941050E-02, 0.14221647E-01,
     +  0.93850615E-02, 0.21923005E-03, 0.19142437E-02, 0.10953087E+00,
     +  0.60096625E-01,-0.51635504E-02,-0.13079789E-01, 0.84598791E-02,
     + -0.12518942E-01, 0.11297040E+00, 0.27928534E-02, 0.54362714E-01,
     +  0.44558030E-02, 0.57614511E-02, 0.12307994E-01, 0.24891680E-01,
     + -0.83564341E-01, 0.19947132E-01, 0.44351127E-01,-0.60531072E-01,
     + -0.62800482E-01, 0.31250060E-01, 0.96636387E-02,-0.24831343E-01,
     +  0.54673623E-01, 0.72170200E-03, 0.10957239E-01,-0.81833050E-01,
     + -0.39705355E-01, 0.18507196E-01,-0.21852346E-01,-0.17383102E-02,
     +  0.63277975E-01, 0.44196546E-01, 0.58228811E-02,-0.86220581E-03,
     + -0.81020116E-03,-0.97107284E-01, 0.25493982E-02,
     +      0.      /
      data ientry/0/
c
      if (ientry.ne.0) go to 10
      ientry=1
      do 5 i=1,m
      if (xmin(i).eq.xmax(i)) go to 5
      scale(i)=2./(xmax(i)-xmin(i))
   5  continue
c
  10  continue
c      normalize variables between -1 and +1
      x1 =1.+(x(  1)-xmax(  1))*scale(  1)
      x2 =1.+(x(  2)-xmax(  2))*scale(  2)
      x3 =1.+(x(  3)-xmax(  3))*scale(  3)
      x4 =1.+(x(  4)-xmax(  4))*scale(  4)
      x5 =1.+(x(  5)-xmax(  5))*scale(  5)
c          set up monomials   functions
      x11 = x1
      x12 = x11*x1
      x13 = x12*x1
      x14 = x13*x1
      x15 = x14*x1
      x21 = x2
      x22 = x21*x2
      x23 = x22*x2
      x24 = x23*x2
      x25 = x24*x2
      x31 = x3
      x32 = x31*x3
      x33 = x32*x3
      x34 = x33*x3
      x35 = x34*x3
      x41 = x4
      x42 = x41*x4
      x43 = x42*x4
      x44 = x43*x4
      x45 = x44*x4
      x46 = x45*x4
      x51 = x5
c
c                  function
c
      y00         =avdat
     1  +coeff(  1)                    
     2  +coeff(  2)        *x31        
     3  +coeff(  3)            *x41    
     4  +coeff(  4)*x11                
     5  +coeff(  5)    *x21            
     6  +coeff(  6)        *x32        
     7  +coeff(  7)        *x31*x41    
     8  +coeff(  8)            *x42    
      y00         =y00         
     9  +coeff(  9)*x11    *x31        
     1  +coeff( 10)    *x21*x31        
     2  +coeff( 11)*x11        *x41    
     3  +coeff( 12)    *x21    *x41    
     4  +coeff( 13)*x11*x21            
     5  +coeff( 14)    *x22            
     6  +coeff( 15)        *x32*x41    
     7  +coeff( 16)        *x31*x42    
     8  +coeff( 17)            *x43    
      y00         =y00         
     9  +coeff( 18)*x11    *x32        
     1  +coeff( 19)*x11    *x31*x41    
     2  +coeff( 20)    *x21*x31*x41    
     3  +coeff( 21)*x11        *x42    
     4  +coeff( 22)    *x22*x31        
     5  +coeff( 23)*x12        *x41    
     6  +coeff( 24)*x11*x21    *x41    
     7  +coeff( 25)    *x22    *x41    
     8  +coeff( 26)        *x34        
      y00         =y00         
     9  +coeff( 27)        *x33*x41    
     1  +coeff( 28)            *x44    
     2  +coeff( 29)    *x21*x32*x41    
     3  +coeff( 30)    *x21    *x43    
     4  +coeff( 31)*x12    *x32        
     5  +coeff( 32)    *x22*x32        
     6  +coeff( 33)    *x22*x31*x41    
     7  +coeff( 34)*x11*x21    *x42    
     8  +coeff( 35)    *x22    *x42    
      y00         =y00         
     9  +coeff( 36)    *x23*x31        
     1  +coeff( 37)*x12*x21    *x41    
     2  +coeff( 38)*x11*x22    *x41    
     3  +coeff( 39)*x14                
     4  +coeff( 40)    *x24            
     5  +coeff( 41)        *x35        
     6  +coeff( 42)        *x34*x41    
     7  +coeff( 43)    *x21*x34        
     8  +coeff( 44)*x12    *x33        
      y00         =y00         
     9  +coeff( 45)    *x22*x33        
     1  +coeff( 46)*x11*x21*x32*x41    
     2  +coeff( 47)    *x22*x32*x41    
     3  +coeff( 48)    *x23*x32        
     4  +coeff( 49)    *x23*x31*x41    
     5  +coeff( 50)    *x23    *x42    
     6  +coeff( 51)*x11*x22*x34        
     7  +coeff( 52)*x12*x21    *x44    
     8  +coeff( 53)*x13*x21    *x43    
      y00         =y00         
     9  +coeff( 54)*x15*x21    *x41    
     1  +coeff( 55)    *x25*x32*x41    
     2  +coeff( 56)    *x25*x35        
     3  +coeff( 57)        *x33        
     4  +coeff( 58)*x12    *x31        
     5  +coeff( 59)*x11*x22            
     6  +coeff( 60)        *x31*x43    
     7  +coeff( 61)    *x21*x31*x42    
     8  +coeff( 62)*x11*x21*x32        
      y00         =y00         
     9  +coeff( 63)    *x23    *x41    
     1  +coeff( 64)        *x33*x42    
     2  +coeff( 65)    *x21*x31*x43    
     3  +coeff( 66)    *x22*x31*x42    
     4  +coeff( 67)*x11*x22*x32        
     5  +coeff( 68)*x11*x22    *x42    
     6  +coeff( 69)*x14    *x31        
     7  +coeff( 70)    *x24    *x41    
     8  +coeff( 71)    *x21*x35        
      y00         =y00         
     9  +coeff( 72)    *x21*x34*x41    
     1  +coeff( 73)    *x22*x32*x42    
     2  +coeff( 74)*x12        *x44    
     3  +coeff( 75)    *x23*x33        
     4  +coeff( 76)*x11*x22*x32*x41    
     5  +coeff( 77)    *x23*x32*x41    
     6  +coeff( 78)*x12*x21    *x43    
     7  +coeff( 79)    *x24*x32        
     8  +coeff( 80)*x11*x23*x31*x41    
      y00         =y00         
     9  +coeff( 81)    *x21*x34*x42    
     1  +coeff( 82)    *x21        *x51
     2  +coeff( 83)*x11*x21*x35        
     3  +coeff( 84)    *x22*x34*x41    
     4  +coeff( 85)    *x22*x33*x42    
     5  +coeff( 86)        *x34*x44    
     6  +coeff( 87)        *x32*x46    
     7  +coeff( 88)    *x21*x31    *x51
     8  +coeff( 89)*x11*x22*x35        
      y00         =y00         
     9  +coeff( 90)    *x24*x34        
     1  +coeff( 91)*x15*x22*x31    *x51
     2  +coeff( 92)*x12                
     3  +coeff( 93)*x12*x21            
     4  +coeff( 94)        *x32*x42    
     5  +coeff( 95)*x11    *x33        
c
      return
      end
