sign(3I)

SIGN, DSIGN, QSIGN, ISIGN, IISIGN, JISIGN, KISIGN - Transfers the sign of numbers

As shipped in IRIX 6.5.7. Added in IRIX 6.5.5.

NAME
     SIGN, DSIGN, QSIGN, ISIGN, IISIGN, JISIGN, KISIGN - Transfers the sign
     of numbers

SYNOPSIS
     SIGN ([A=]a,[B=]b)
     DSIGN ([A=]a,[B=]b)
     QSIGN ([A=]a,[B=]b)
     ISIGN ([A=]a,[B=]b)
     IISIGN ([A=]a,[B=]b)
     JISIGN ([A=]a,[B=]b)
     KISIGN ([A=]a,[B=]b)

IMPLEMENTATION
     UNICOS, UNICOS/mk, IRIX systems

     CF90, MIPSpro 7 Fortran 90, MIPSpro Fortran 77

STANDARDS
     Fortran

     Fortran extensions:  ISIGN, IISIGN, JISIGN, KISIGN, DSIGN, QSIGN

DESCRIPTION
     These intrinsics transfer the sign of b to a.  SIGN is the generic
     function name; the others are specifics.  These are elemental
     intrinsic functions.  They accept the following arguments:

     a         Must be of type integer or real.  If a is zero, the result
               is zero for SIGN, ISIGN, DSIGN, and QSIGN.

     b         Must be of the same type and kind type as a.

     These functions evaluate one of the following equations, depending on
     the sign of the number:

          y = |a|, if b >= 0

     or

          y = -|a|, if b < 0

     SIGN transfers the sign from one real number to another.

     ISIGN transfers the sign from one integer (KIND=2 or KIND=4) to
     another.

     IISIGN transfers the sign from one integer (KIND=2) to another.

     JISIGN transfers the sign from one integer (KIND=4) to another.

     KISIGN transfer the sign from one integer (KIND=8) to another.

     DSIGN transfers the sign from one double-precision real number to
     another.

     QSIGN transfers the sign from one quad-precision real number to
     another.

     The SIGN, ISIGN, and DSIGN intrinsic function names can be passed as
     arguments; the other cannot.

RETURN VALUES
     On UNICOS/mk and UNICOS systems that support IEEE arithmetic, the
     following return value occurs:

          SIGN(-1.0,-.0) = -1.0

     On UNICOS systems that do not support IEEE arithmetic, the following
     return value occurs:

          SIGN(-1.0,-.0) = 1.0

     On IRIX systems, the following return value occurs:

          SIGN(-1.0,-.0)

     On IRIX systems, if the program is compiled with the
     -LANG:IEEE_minus_zero=ON option, the following return value occurs:

          SIGN(-1.0,-.0) = -1.0

SEE ALSO
     Intrinsic Procedures Reference Manual for the printed version of this
     man page.