      function dsgn(x)
      real*8 dsgn, x
      if (x) 1,2,3
1     dsgn = -1.d0
      return
2     dsgn = 0.d0
      return
3     dsgn = 1.d0
      return
      end
