anchor.diff:        do s = 2, stnserod - 1
            a = dels(s) 
            b = dels(s - 1) 
  -         if( a .eq. 0.0 .or. b .eq. 0.0 ) then
  +         if( a .eq. 0.d0 .or. b .eq. 0.d0 ) then
               print *, 'dels(s) or dels(s-1) equals zero'
               stop
            end if
            c = sqrt((delx(s - 1) + delx(s)) * (delx(s - 1) + delx(s)) + 
        +            (dely(s - 1) + dely(s)) * (dely(s - 1) + dely(s)))
            carg = (a * a + b * b - c * c) / (2.d0 * a * b)
  -         if( carg .lt. -1.0 ) then
  +         if( carg .lt. -1.d0 ) then
   c            if( carg .gt. -1.0001 ) carg = -1.d0
                carg = -1.d0
            end if
  -         if( carg .gt. 1.0 ) then
  +         if( carg .gt. 1.d0 ) then
   c            if( carg .lt. 1.0001 ) carg = 1.d0
               carg = 1.d0
            end if
  
positive.code:                leftdepth(s) = depth(s) - width(s) * transslope(s) / 2.d0
              else
                 Acs(s) = 0.5d0 * depth(s) ** 2.d0 / xmagtransslope
                 if (curvature(s) .lt. 0.0) then
                    rightdepth(s) = 0.d0
                    leftdepth(s) = 2.d0 * depth(s)
                 else
  
negative.code:             do while (xs(sp) .le. xtrmnt .and. sp .le. stnserod)
                 if (xs(sp) .ge. xstrt) then
                    xdel = sign(xdest - xs(sp), 1.d0)
                    if (lambda(s) .ne. 0.d0) then
                       gaussian = exp(-1.d0 * xdel ** 2.d0 / 2.d0 
       +                    / lambda(s) ** 2.d0) / sqrt(2.d0 * 3.1416d0) 
       +                    / lambda(s) 
  