anchor.diff:  !!            ENDIF
               !! if s == 0, returns 1
               z = sign(1.d0,s(i,mw))
  -            amdq(i,1:3) = amdq(i,1:3) + (1-z)/2*fwave(i,1:3,mw)
  -            apdq(i,1:3) = apdq(i,1:3) + (z+1)/2*fwave(i,1:3,mw)
  +            amdq(i,1:3) = amdq(i,1:3) + (1-z)/2.0*fwave(i,1:3,mw)
  +            apdq(i,1:3) = apdq(i,1:3) + (z+1)/2.0*fwave(i,1:3,mw)
           ENDDO
       ENDDO
   
  
positive.code: 
      DOUBLE PRECISION  hvR, hvL, vR, vL
      double precision z
  
      if (ixy .eq. 1) then
          mu=2
  
negative.code:     IMPLICIT NONE
  
      !input
      INTEGER maxm,meqn,mwaves,mbc,mx, ixy
  
      DOUBLE PRECISION  fwave(1-mbc:maxm+mbc,meqn, mwaves)
      DOUBLE PRECISION      s(1-mbc:maxm+mbc,mwaves)
  