*CMZ :  2.05/00 08/11/2000  12.00.11  by  Vladimir Shekelyan
*-- Author :    Vladimir Shekelyan   08/11/2000
       real function  sflhqc3x5as01150exa2(xin,q2in)
***********************************************************
c  parametrization of fl-ep  from a fit to dis data
c  available for :  0.000005 <= x <=  0.902513  and
c
c                        0.200 <= q2 <=    3500.000
c*
c   for q2 or x outside limits, the closest
c  limit is assumed : f2(x>xmax,q2)=f2(xmax,q2)
c                     f2(x<xmin,q2)=f2(xmin,q2)
c                     f2(x,q2>q2max)=f2(x,q2max)
c                     f2(x,q2<q2min)=f2(x,q2min)
c*
c  input : x and q2
c  library : cernlib (mathlib) for tchebytchev poly. routine
c  comments, etc... to c. pascaud or f. zomer
***********************************************************
       real x,q2,q2min,q2max,xin,q2in
       double precision xmax,t,dchsum,coef(0:100),f(2)
       parameter(nq= 77,xmax= 0.902513)
       parameter(q2min=      0.200,q2max=   3500.000)
       double precision qbin( 77),xmin( 77)
       integer nqbin( 77)
       double precision param(0: 64,100)
       data   ilsave/0/
       data   qbin /      0.200
     &,     0.300,     0.400,     0.500,     0.600,     0.700,     0.800
     &,     0.900,     1.000,     1.100,     1.200,     1.300,     1.400
     &,     1.500,     1.600,     1.700,     1.800,     1.900,     1.960
     &,     2.000,     2.100,     2.200,     2.300,     2.400,     2.500
     &,     3.000,     3.500,     4.000,     4.500,     5.000,     6.000
     &,     7.000,     8.000,     9.000,    10.000,    15.000,    20.000
     &,    20.250,    25.000,    30.000,    35.000,    40.000,    45.000
     &,    50.000,    55.000,    60.000,    65.000,    70.000,    75.000
     &,    80.000,    85.000,    90.000,    95.000,   100.000,   150.000
     &,   200.000,   250.000,   300.000,   350.000,   400.000,   450.000
     &,   500.000,   550.000,   600.000,   650.000,   700.000,   750.000
     &,   800.000,   850.000,   900.000,   950.000,  1000.000,  1500.000
     &,  2000.000,  2500.000,  3000.000,  3500.000
     & /
       data   xmin /  0.0000050
     &, 0.0000050, 0.0000050, 0.0000050, 0.0000050, 0.0000050, 0.0000050
     &, 0.0000050, 0.0000050, 0.0000050, 0.0000050, 0.0000050, 0.0000050
     &, 0.0000050, 0.0000050, 0.0000050, 0.0000050, 0.0000050, 0.0000050
     &, 0.0000050, 0.0000050, 0.0000050, 0.0000050, 0.0000050, 0.0000050
     &, 0.0000050, 0.0000050, 0.0000050, 0.0000050, 0.0000050, 0.0000060
     &, 0.0000070, 0.0000080, 0.0000090, 0.0000100, 0.0000150, 0.0000200
     &, 0.0000202, 0.0000250, 0.0000300, 0.0000350, 0.0000400, 0.0000449
     &, 0.0000499, 0.0000549, 0.0000599, 0.0000649, 0.0000699, 0.0000749
     &, 0.0000799, 0.0000849, 0.0000899, 0.0000949, 0.0000999, 0.0001498
     &, 0.0001998, 0.0002497, 0.0002996, 0.0003496, 0.0003995, 0.0004495
     &, 0.0004994, 0.0005493, 0.0005993, 0.0006492, 0.0006992, 0.0007491
     &, 0.0007990, 0.0008490, 0.0008989, 0.0009489, 0.0009988, 0.0014982
     &, 0.0019976, 0.0024970, 0.0029964, 0.0034958
     & /
       if(ilsave.EQ.0) THEN
       ilsave=1
280   format(6d12.5)
       open(unit=28,file='sflhqc3x5as01150exa2.data',status='old')
       read(28,280)(param(k,  1),k=0, 64)
       read(28,280)(param(k,  2),k=0, 64)
       read(28,280)(param(k,  3),k=0, 64)
       read(28,280)(param(k,  4),k=0, 64)
       read(28,280)(param(k,  5),k=0, 64)
       read(28,280)(param(k,  6),k=0, 64)
       read(28,280)(param(k,  7),k=0, 64)
       read(28,280)(param(k,  8),k=0, 64)
       read(28,280)(param(k,  9),k=0, 64)
       read(28,280)(param(k, 10),k=0, 64)
       read(28,280)(param(k, 11),k=0, 64)
       read(28,280)(param(k, 12),k=0, 64)
       read(28,280)(param(k, 13),k=0, 64)
       read(28,280)(param(k, 14),k=0, 64)
       read(28,280)(param(k, 15),k=0, 64)
       read(28,280)(param(k, 16),k=0, 64)
       read(28,280)(param(k, 17),k=0, 64)
       read(28,280)(param(k, 18),k=0, 64)
       read(28,280)(param(k, 19),k=0, 64)
       read(28,280)(param(k, 20),k=0, 64)
       read(28,280)(param(k, 21),k=0, 64)
       read(28,280)(param(k, 22),k=0, 64)
       read(28,280)(param(k, 23),k=0, 64)
       read(28,280)(param(k, 24),k=0, 64)
       read(28,280)(param(k, 25),k=0, 64)
       read(28,280)(param(k, 26),k=0, 64)
       read(28,280)(param(k, 27),k=0, 64)
       read(28,280)(param(k, 28),k=0, 64)
       read(28,280)(param(k, 29),k=0, 64)
       read(28,280)(param(k, 30),k=0, 64)
       read(28,280)(param(k, 31),k=0, 64)
       read(28,280)(param(k, 32),k=0, 64)
       read(28,280)(param(k, 33),k=0, 64)
       read(28,280)(param(k, 34),k=0, 64)
       read(28,280)(param(k, 35),k=0, 64)
       read(28,280)(param(k, 36),k=0, 57)
       read(28,280)(param(k, 37),k=0, 39)
       read(28,280)(param(k, 38),k=0, 34)
       read(28,280)(param(k, 39),k=0, 34)
       read(28,280)(param(k, 40),k=0, 23)
       read(28,280)(param(k, 41),k=0, 33)
       read(28,280)(param(k, 42),k=0, 33)
       read(28,280)(param(k, 43),k=0, 24)
       read(28,280)(param(k, 44),k=0, 25)
       read(28,280)(param(k, 45),k=0, 33)
       read(28,280)(param(k, 46),k=0, 27)
       read(28,280)(param(k, 47),k=0, 28)
       read(28,280)(param(k, 48),k=0, 28)
       read(28,280)(param(k, 49),k=0, 24)
       read(28,280)(param(k, 50),k=0, 24)
       read(28,280)(param(k, 51),k=0, 29)
       read(28,280)(param(k, 52),k=0, 38)
       read(28,280)(param(k, 53),k=0, 23)
       read(28,280)(param(k, 54),k=0, 26)
       read(28,280)(param(k, 55),k=0, 23)
       read(28,280)(param(k, 56),k=0, 24)
       read(28,280)(param(k, 57),k=0, 24)
       read(28,280)(param(k, 58),k=0, 26)
       read(28,280)(param(k, 59),k=0, 26)
       read(28,280)(param(k, 60),k=0, 27)
       read(28,280)(param(k, 61),k=0, 26)
       read(28,280)(param(k, 62),k=0, 27)
       read(28,280)(param(k, 63),k=0, 26)
       read(28,280)(param(k, 64),k=0, 22)
       read(28,280)(param(k, 65),k=0, 33)
       read(28,280)(param(k, 66),k=0, 28)
       read(28,280)(param(k, 67),k=0, 24)
       read(28,280)(param(k, 68),k=0, 23)
       read(28,280)(param(k, 69),k=0, 22)
       read(28,280)(param(k, 70),k=0, 22)
       read(28,280)(param(k, 71),k=0, 22)
       read(28,280)(param(k, 72),k=0, 26)
       read(28,280)(param(k, 73),k=0, 24)
       read(28,280)(param(k, 74),k=0, 20)
       read(28,280)(param(k, 75),k=0, 22)
       read(28,280)(param(k, 76),k=0, 21)
       read(28,280)(param(k, 77),k=0, 20)
281   format(25i3)
       read(28,281)(nqbin(k),k=1, 77)
       rewind(28)
       close(28)
C--                  precision is better than   0.112E-01
       ENDIF
       sflhqc3x5as01150exa2=0.
       x=xin
       q2=q2in
       if(x.GT.xmax)x=xmax*0.999999
       if(q2.GT.q2max)q2=q2max*0.999999
       if(q2.LE.q2min)q2=q2min*1.000001
       do i = 1,nq-1
         if(q2.GT.qbin(i).and.q2.LE.qbin(i+1))goto 1
       ENDDO
       return
1      do 3 k=0,1
       f(k+1)=-35.
       if(x.lt.xmin(i+k)) goto 3
       t=xmin(i+k)
       t=(2*log10(x)-log10(t)-log10(xmax))/(log10(xmax)-log10(t))
       do 2 j=0,nqbin(i+k)
2      coef(j)=param(j,i+k)
       f(k+1) = dchsum(1,coef,nqbin(i+k),t)
       if(f(k+1).GT.6.305116e-16) THEN
       f(k+1)=log(f(k+1))
       ELSEIF(-f(k+1).GT.6.305116e-16)THEN
       f(k+1)=-70.-log(-f(k+1))
       ELSE
4      f(k+1)=-35.
       ENDIF
3      continue
       a=(f(2)-f(1))/log(qbin(i+1)/qbin(i))
       b=f(2)-a*log(qbin(i+1))
       a=a*log(q2)+b
       if(a.LT.-35.) THEN
       a=-a-70.
       a=-exp(a)
       ELSE
       a=exp(a)
       ENDIF
       sflhqc3x5as01150exa2=a-a*x
       return
       end
