1c Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2c Copyright (C) INRIA
3c
4c Copyright (C) 2012 - 2016 - Scilab Enterprises
5c
6c This file is hereby licensed under the terms of the GNU GPL v2.0,
7c pursuant to article 5.3.4 of the CeCILL v.2.1.
8c This file was originally licensed under the terms of the CeCILL v2.1,
9c and continues to be available under such terms.
10c For more information, see the COPYING file which you should have received
11c along with this program.
12c
13      subroutine wsign(xr,xi,yr,yi,zr,zi)
14c
15      double precision xr,xi,yr,yi,zr,zi,pythag,t
16c     if y .ne. 0, z = x*y/abs(y)
17c     if y .eq. 0, z = x
18      t = pythag(yr,yi)
19      zr = xr
20      zi = xi
21      if (t .ne. 0.0d+0) call wmul(yr/t,yi/t,zr,zi,zr,zi)
22      return
23      end
24