anchor.diff:           wsin = zero
         Else
            temp = half * (ghg-vhv)
  -         vmu = temp + dsign (sqrt(temp**2+vhg**2), temp)
  +         vmu = temp + sign (sqrt(temp**2+vhg**2), temp)
            temp = sqrt (vmu**2+vhg**2)
            wcos = vmu / temp
            wsin = vhg / temp
  
positive.code: !
        tempa = abs (delsq-dsq)
        tempb = sqrt (dtz*dtz+tempa*zsq)
        gam = tempa / (dsign(tempb, dtz)+dtz)
        temp = tol * (wsq+par*delsq) - gam * gam * wwsq
        If (temp >= zero) Then
           Do 310 i = 1, n
  
negative.code:       tempc = halfrt * (abs(dlin)+abs(vlin)) + 0.25_wp * abs &
         (ghg+vhv)
        If (tempa >= tempb .And. tempa >= tempc) Then
           tempd = sign (rho, dlin*(vmu+vhv))
           tempv = zero
        Else If (tempb >= tempc) Then
           tempd = zero
           tempv = sign (rho, vlin*(ghg-vmu))
        Else
           tempd = sign (halfrt*rho, dlin*(ghg+vhv))
           tempv = sign (halfrt*rho, vlin*(ghg+vhv))
        End If
        Do 160 i = 1, n
  160   d (i) = tempd * d (i) + tempv * v (i)
  