anchor.diff:  c
            power=0.0d0
   c
  -         do 1 i=1,nb
  +         do 1 i=1,nbins
               s     = 0.0d0
               k     = 0
               kk    = 0
  
positive.code: c======================================================
  c     Compute folded time series with  *p0*  period
  c======================================================
  c
           do 101 j=1,nb
              y(j) = 0.0d0
              ibi(j) = 0
   101     continue
  
negative.code:       implicit none
  c
  
        integer, intent(in) :: n, nf, nbins
        real*8, dimension(n), intent(in) :: t, x
        real*8, dimension(n), intent(inout) :: u, v
        real*8, intent(in) :: fmin, df, qmin, qmax
  
        real*8, dimension(nf), intent(out) :: p
        real*8, intent(out) :: bper, bpow, depth, qtran
        integer, intent(out) :: in1, in2
  
  c     these two arrays hold the binned timeseries
        real*8, dimension(30000) :: y
        integer, dimension(30000) :: ibi
  c
        integer :: minbin,nbinsmax,kmi,kma,kkmi,nb1,nbkma,i,jf,j,jnb,k,kk,
       &     nb2,jn1,jn2
        real*8 :: rn,tot,s,t1,f0,p0,ph,power,rn1,pow,rn3,s3
  
  c
        minbin = 5
        nbinsmax  = 30000
        if(nbins.gt.nbinsmax) write(*,*) ' NBINS > NBINSMAX !!'
        if(nbins.gt.nbinsmax) stop
        tot=t(n)-t(1)
        if(fmin.lt.1.0d0/tot) write(*,*) ' fmin < 1/T !!'
        if(fmin.lt.1.0d0/tot) stop
  c------------------------------------------------------------------------
  c
        rn=dfloat(n)
        kmi=idint(qmin*dfloat(nbins))
        if(kmi.lt.1) kmi=1
        kma=idint(qmax*dfloat(nbins))+1
        kkmi=idint(rn*qmin)
        if(kkmi.lt.minbin) kkmi=minbin
        bpow=0.0d0
  c
  c     The following variables are defined for the extension
  c     of arrays  ibi()  and  y()  [ see below ]
  c
        nb1   = nbins+1
        nbkma = nbins+kma
  c
  c=================================
  c     Set temporal time series
  