*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> f90/ieee_copy_sign (3)              
Title
Content
Arch
Section
 

Contents


IEEE_COPY_SIGN(3I)				       Last changed: 1-6-98

NAME    [Toc]    [Back]

     IEEE_COPY_SIGN - Returns x	with the sign of y

SYNOPSIS    [Toc]    [Back]

     IEEE_COPY_SIGN ([X=]x, [Y=]y)

IMPLEMENTATION    [Toc]    [Back]

     UNICOS/mk and IRIX	systems

     CRAY T90 systems that support IEEE	floating-point arithmetic

STANDARDS    [Toc]    [Back]

     CF90 and MIPSpro 7	Fortran	90 compiler extension to Fortran 90

     IEEE Standard for Binary Floating-point Arithmetic

DESCRIPTION    [Toc]    [Back]

     The IEEE_COPY_SIGN	intrinsic function returns x with the sign of y.
     For example,
     ABS(x) = IEEE_COPY_SIGN(x,	1.0) even if x is a NaN.

     The Fortran 90 standard SIGN(3M) intrinsic	function produces the same
     result as IEEE_COPY_SIGN on systems that support IEEE floating-point
     arithmetic.

     This function accepts the following arguments:

     x	       Must be of type real.

     y	       Must be of type real.  If x is a	scalar,	y must be a scalar.
	       If x is an array, y can be scalar or an array of	the same
	       shape as	x.

     IEEE_COPY_SIGN is an elemental function.  The name	of this	intrinsic
     cannot be passed as an argument.

NOTES    [Toc]    [Back]

     The IEEE intrinsic	procedures use the named constants contained in	a
     system module, so you must	include	one of the following statements	in
     your program:

     * On UNICOS and UNICOS/mk systems:	 USE CRI_IEEE_DEFINITIONS

     * On UNICOS, UNICOS/mk, and IRIX systems:	USE FTN_IEEE_DEFINITIONS

     The CRI_IEEE_DEFINITIONS module is	obsolescent.  It will be removed
     for the CF90 4.0 release.

RETURN VALUES    [Toc]    [Back]

     The return	value is of the	same type and type parameter as	x.  If x is
     an	array, the result is an	array of the same shape	as x.

     If	x is scalar, the result	is a scalar that has the same value as x
     but with the sign of y.

     If	x is an	array and y is scalar, the result is an	array in which each
     element has the value of the corresponding	element	of x and the sign
     of	y.

     If	x is an	array and y is an array, the result is an array	in which
     each element has the value	of x  but the sign of y	.
				    i		       i

EXAMPLES    [Toc]    [Back]

     Example 1.	 Each element of x now has its original	value but with the
     sign of each corresponding	element	of y:

	  REAL	 x(10),	y(10)
	  ...		      !	Compute	X and Y.
	  x = IEEE_COPY_SIGN(x,	y)

     Example 2.	 The following PRINT statement is executed on a	system that
     supports the IEEE standard	for floating-point arithmetic:

	  PRINT	*, 'IEEE_COPY_SIGN(5.0,-0.0)

     The output	of the preceding PRINT statement is -5.0.

SEE ALSO    [Toc]    [Back]

      
      
     SIGN(3M)

     Intrinsic Procedures Reference Manual, publication	SR-2138, for the
     printed version of	this man page.

IEEE_COPY_SIGN(3I)				       Last changed: 1-6-98

NAME    [Toc]    [Back]

     IEEE_COPY_SIGN - Returns x	with the sign of y

SYNOPSIS    [Toc]    [Back]

     IEEE_COPY_SIGN ([X=]x, [Y=]y)

IMPLEMENTATION    [Toc]    [Back]

     UNICOS/mk and IRIX	systems

     CRAY T90 systems that support IEEE	floating-point arithmetic

STANDARDS    [Toc]    [Back]

     CF90 and MIPSpro 7	Fortran	90 compiler extension to Fortran 90

     IEEE Standard for Binary Floating-point Arithmetic

DESCRIPTION    [Toc]    [Back]

     The IEEE_COPY_SIGN	intrinsic function returns x with the sign of y.
     For example,
     ABS(x) = IEEE_COPY_SIGN(x,	1.0) even if x is a NaN.

     The Fortran 90 standard SIGN(3M) intrinsic	function produces the same
     result as IEEE_COPY_SIGN on systems that support IEEE floating-point
     arithmetic.

     This function accepts the following arguments:

     x	       Must be of type real.

     y	       Must be of type real.  If x is a	scalar,	y must be a scalar.
	       If x is an array, y can be scalar or an array of	the same
	       shape as	x.

     IEEE_COPY_SIGN is an elemental function.  The name	of this	intrinsic
     cannot be passed as an argument.

NOTES    [Toc]    [Back]

     The IEEE intrinsic	procedures use the named constants contained in	a
     system module, so you must	include	one of the following statements	in
     your program:

     * On UNICOS and UNICOS/mk systems:	 USE CRI_IEEE_DEFINITIONS

     * On UNICOS, UNICOS/mk, and IRIX systems:	USE FTN_IEEE_DEFINITIONS

     The CRI_IEEE_DEFINITIONS module is	obsolescent.  It will be removed
     for the CF90 4.0 release.

RETURN VALUES    [Toc]    [Back]

     The return	value is of the	same type and type parameter as	x.  If x is
     an	array, the result is an	array of the same shape	as x.

     If	x is scalar, the result	is a scalar that has the same value as x
     but with the sign of y.

     If	x is an	array and y is scalar, the result is an	array in which each
     element has the value of the corresponding	element	of x and the sign
     of	y.

     If	x is an	array and y is an array, the result is an array	in which
     each element has the value	of x  but the sign of y	.
				    i		       i

EXAMPLES    [Toc]    [Back]

     Example 1.	 Each element of x now has its original	value but with the
     sign of each corresponding	element	of y:

	  REAL	 x(10),	y(10)
	  ...		      !	Compute	X and Y.
	  x = IEEE_COPY_SIGN(x,	y)

     Example 2.	 The following PRINT statement is executed on a	system that
     supports the IEEE standard	for floating-point arithmetic:

	  PRINT	*, 'IEEE_COPY_SIGN(5.0,-0.0)

     The output	of the preceding PRINT statement is -5.0.

SEE ALSO    [Toc]    [Back]

      
      
     SIGN(3M)

     Intrinsic Procedures Reference Manual, publication	SR-2138, for the
     printed version of	this man page.

[ Back ]
 Similar pages
Name OS Title
login IRIX sign on
CL_CrlSign Tru64 Sign a CRL (CDSA)
CSSM_CL_CrlSign Tru64 Sign a CRL (CDSA)
CL_CertSign Tru64 Sign a certificate (CDSA)
EUR Tru64 Euro currency sign
Euro Tru64 Euro currency sign
euro Tru64 Euro currency sign
CSSM_CL_CertSign Tru64 Sign a certificate (CDSA)
copysign Linux copy sign of a number
CSSM_SignData Tru64 Sign all buffer data (CDSA)
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service