anchor.diff:       &             *(lda_c+beta*(F1dn-chidn2*F2dn))
                fdagrxdn = -beta*chidn*F2dn
                if ((fdnxdn-xedn).gt.0.0d0) then
  -             call Becke_smalln_correction(ndn,ndn_thrd,agrdn,beta,lda_c,
  +             call Becke_smalln_correction(ndn,ndn_thrd,agrdn,1.0d0,beta,
  +     >                               lda_c,
        >                               chidn,chidn2,chidnSQ,Kdn,F1dn,F2dn,
        >                               xedn,fdnxdn,fdagrxdn)
                end if 
             end if 
   *         ***********END DOWN****************
   
  -          xe = (xeup*nup + xedn*ndn)/n
  +           xe = (xeup*nup + xedn*ndn)/n
   
          end if
   *      *******end excange part************
  
positive.code:       parameter (etthrd = 8.0d0/3.0d0)
        
        integer j
        real*8 pi,lda_c
  
        real*8 nup,ndn,n,agrup,agrdn,agr
        real*8 agr2, agrup2,agrdn2
  
negative.code:       !etthrd = thrd*8.0d0
  
        pi = 4.0d0*datan(1.0d0)
        Cf = dble(3.0d0*pi*pi)
        Cf = dble(3.0d0*(Cf**(2.0d0/3.0d0))/10.0d0)
  
        lda_c =(3.0d0/2.0d0)*(3.0d0/(4.0d0*pi))**(1.0d0/3.0d0)
  
  