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

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

Contents


ABS(3F)								       ABS(3F)


NAME    [Toc]    [Back]

     abs, iabs,	dabs, qabs, cabs, zabs,	cqabs, iiabs, jiabs - FORTRAN absolute
     value

SYNOPSIS    [Toc]    [Back]

     integer i1, i2
     real r1, r2
     double precision dp1, dp2
     real*16 qp1, qp2
     complex cx1, cx2
     double complex dx1, dx2
     complex*32	qx1, qx2
     integer*2 ii1, ii2
     integer*4 ji1, ji2

     r2	= abs(r1)

     i2	= iabs(i1)
     i2	= abs(i1)

     dp2 = dabs(dp1)
     dp2 = abs(dp1)

     qp2 = qabs(qp1)
     qp2 = abs(qp1)

     cx2 = cabs(cx1)
     cx2 = abs(cx1)

     dx2 = zabs(dx1)
     dx2 = abs(dx1)

     qx2 = cqabs(qx1)
     qx2 = abs(qx1)

     ii2 = iiabs(ii1)
     ii2 = abs(ii1)

     ji2 = jiabs(ji1)
     ji2 = abs(ji1)

DESCRIPTION    [Toc]    [Back]

     abs is the	family of absolute value functions.  iabs returns the integer
     absolute value of its integer argument.  It accepts either	integer*2 or
     integer*4 arguments and the result	is the same type.  dabs	returns	the
     double-precision absolute value of	its double-precision argument.	qabs
     returns the real*16 absolute value	of its real*16 argument.  cabs returns
     the complex absolute value	of its complex argument.  zabs returns the
     double-complex absolute value of its double-complex argument.  cqabs
     returns the complex*32 absolute value of its complex*32 argument.	iiabs
     returns the integer*2 absolute value of its integer*2 argument.  jiabs
     returns the integer*4 absolute value of its integer*4 argument.  The



									Page 1






ABS(3F)								       ABS(3F)



     generic form abs returns the type of its argument.

SEE ALSO    [Toc]    [Back]

      
      
     floor(3M).

CAVEAT    [Toc]    [Back]

     In	two's-complement integer (integer*2 or integer*4) representation the
     absolute value of the negative integer with largest magnitude is
     undefined.	 Some implementations trap this	error, but others simply
     ignore it.













































									Page 2



ABS(3M)						       Last changed: 1-6-98

NAME    [Toc]    [Back]

     ABS, IABS,	DABS, CABS, CDABS - Computes absolute value

SYNOPSIS    [Toc]    [Back]

     UNICOS and	UNICOS/mk systems:

     ABS ([A=]a)
     IABS ([A=]a)
     DABS ([A=]a)
     CABS ([A=]a)

     UNICOS and	IRIX systems:
     CDABS ([A=]a)

IMPLEMENTATION    [Toc]    [Back]

     UNICOS, UNICOS/mk,	and IRIX systems

STANDARDS    [Toc]    [Back]

     Fortran 90
     CDABS is a	compiler extension to Fortran 90

DESCRIPTION    [Toc]    [Back]

     ABS is the	generic	function name.	ABS, IABS, DABS, and CABS are
     intrinsic and are elemental functions for the CF90	compiler.

     The entry point CDABS is provided for support in other languages.	It
     is	not recognized as an intrinsic function; therefore, you	must use
     the CDIR$ VFUNCTION directive to allow vectorization.

     These functions evaluate as follows:  y = |x|, except for CABS and
     CDABS, which evaluate the following:
		  2	2 1/2
	  y = |(x   + x	 )   |'
		 r     i
   CF90
     CDABS is called implicitly	by the Fortran 90 compiler as a	result of a
     generic ABS call with a complex double argument.

   CAL Register	Usage (Cray Research Systems Only)
     Scalar IABS:  IABS% (call-by-register)
	  on entry   (S1) = argument
	  on exit    (S1) = result

     Scalar DABS:  DABS% (call-by-register)
	  on entry   (S1) and (S2) = argument
	  on exit    (S1) and (S2) = result

     Scalar CABS:  CABS% (call-by-register)
	  on entry   (S1) and (S2) = argument
	  on exit    (S1) = result

     Vector CABS:  %CABS% (call-by-register)
	  on entry   (V1) = argument vector 1 (real part)
		     (V2) = argument vector 2 (imaginary part)
	  on exit    (V1) = result vector

     Scalar CDABS:  CDABS% (call-by-register)
	  on entry   (S1), (S2), (S3), (S4) = argument
	  on exit    (S1), (S2)	= result

     Vector CDABS:  %CDABS% (call-by-register)
	  on entry   (V1), (V2), (V3), (V4) = argument vector
	  on exit    (V1), (V2)	= result vector

   Argument Ranges		 2450
     infinity is approximately 10
						       308
     On	UNICOS/mk systems, infinity is approximately 10

     ABS, IABS,	DABS:

	  |x| <	infinity

     CABS, CDABS (CDABS	is not available on UNICOS/mk systems):

	  |x |,	|x | < infinity
	    r	  i

NOTES    [Toc]    [Back]

     CDABS is an outmoded routine for the CF90 compiler.  Refer	to the
     Fortran Language Reference	Manual,	Volume 3, publication SR-3905, for
     information about outmoded	features and their preferred standard
     alternatives.

     The name of the ABS, IABS,	DABS, and CABS intrinsic can be	passed as
     an	argument.  The name of the CDABS intrinsic cannot be passed as an
     argument.

RETURN VALUES    [Toc]    [Back]

     ABS returns the real absolute value of its	real argument.

     IABS returns the integer absolute value of	its integer argument.

     DABS returns the double-precision absolute	value of its
     double-precision argument.

     CABS returns the absolute value of	its complex argument as	a real
     number.

     CDABS returns the absolute	value of its complex double-precision
     argument as a double-precision number.

     When the correct value would overflow, CABS and CDABS abort with a
     floating-point error.

     On	CRAY T90 systems that support IEEE arithmetic, the following return
     values occur:

     ABS(x):

	  |x| =	infinity, result is infinity

	  x =  NaN, result is NaN

     CABS(x):

	  x or y = NaN,	result is NaN

	  |x| =	infinity and y is not NaN, result is infinity

	  |y| =	inf and	x is not NaN, result is	infinity

     When overflow occurs for good input, infinity is returned.

SEE ALSO    [Toc]    [Back]

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




ABS(3C)								       ABS(3C)


NAME    [Toc]    [Back]

     abs, labs - return	integer	absolute value

SYNOPSIS    [Toc]    [Back]

     #include <stdlib.h>

     int abs (int i);

     long int labs (long int i);

DESCRIPTION    [Toc]    [Back]

     abs and labs return the absolute value of their int or long int operand.

SEE ALSO    [Toc]    [Back]

      
      
     floor(3M).

CAVEAT    [Toc]    [Back]

     In	two's-complement representation, the absolute value of the negative
     integer with largest magnitude is undefined.  In this case, abs (or labs)
     will generate a SIGFPE.



































									Page 1



ABS(3M)						       Last changed: 1-6-98

NAME    [Toc]    [Back]

     ABS, IABS,	DABS, CABS, CDABS - Computes absolute value

SYNOPSIS    [Toc]    [Back]

     UNICOS and	UNICOS/mk systems:

     ABS ([A=]a)
     IABS ([A=]a)
     DABS ([A=]a)
     CABS ([A=]a)

     UNICOS and	IRIX systems:
     CDABS ([A=]a)

IMPLEMENTATION    [Toc]    [Back]

     UNICOS, UNICOS/mk,	and IRIX systems

STANDARDS    [Toc]    [Back]

     Fortran 90
     CDABS is a	compiler extension to Fortran 90

DESCRIPTION    [Toc]    [Back]

     ABS is the	generic	function name.	ABS, IABS, DABS, and CABS are
     intrinsic and are elemental functions for the CF90	compiler.

     The entry point CDABS is provided for support in other languages.	It
     is	not recognized as an intrinsic function; therefore, you	must use
     the CDIR$ VFUNCTION directive to allow vectorization.

     These functions evaluate as follows:  y = |x|, except for CABS and
     CDABS, which evaluate the following:
		  2	2 1/2
	  y = |(x   + x	 )   |'
		 r     i
   CF90
     CDABS is called implicitly	by the Fortran 90 compiler as a	result of a
     generic ABS call with a complex double argument.

   CAL Register	Usage (Cray Research Systems Only)
     Scalar IABS:  IABS% (call-by-register)
	  on entry   (S1) = argument
	  on exit    (S1) = result

     Scalar DABS:  DABS% (call-by-register)
	  on entry   (S1) and (S2) = argument
	  on exit    (S1) and (S2) = result

     Scalar CABS:  CABS% (call-by-register)
	  on entry   (S1) and (S2) = argument
	  on exit    (S1) = result

     Vector CABS:  %CABS% (call-by-register)
	  on entry   (V1) = argument vector 1 (real part)
		     (V2) = argument vector 2 (imaginary part)
	  on exit    (V1) = result vector

     Scalar CDABS:  CDABS% (call-by-register)
	  on entry   (S1), (S2), (S3), (S4) = argument
	  on exit    (S1), (S2)	= result

     Vector CDABS:  %CDABS% (call-by-register)
	  on entry   (V1), (V2), (V3), (V4) = argument vector
	  on exit    (V1), (V2)	= result vector

   Argument Ranges		 2450
     infinity is approximately 10
						       308
     On	UNICOS/mk systems, infinity is approximately 10

     ABS, IABS,	DABS:

	  |x| <	infinity

     CABS, CDABS (CDABS	is not available on UNICOS/mk systems):

	  |x |,	|x | < infinity
	    r	  i

NOTES    [Toc]    [Back]

     CDABS is an outmoded routine for the CF90 compiler.  Refer	to the
     Fortran Language Reference	Manual,	Volume 3, publication SR-3905, for
     information about outmoded	features and their preferred standard
     alternatives.

     The name of the ABS, IABS,	DABS, and CABS intrinsic can be	passed as
     an	argument.  The name of the CDABS intrinsic cannot be passed as an
     argument.

RETURN VALUES    [Toc]    [Back]

     ABS returns the real absolute value of its	real argument.

     IABS returns the integer absolute value of	its integer argument.

     DABS returns the double-precision absolute	value of its
     double-precision argument.

     CABS returns the absolute value of	its complex argument as	a real
     number.

     CDABS returns the absolute	value of its complex double-precision
     argument as a double-precision number.

     When the correct value would overflow, CABS and CDABS abort with a
     floating-point error.

     On	CRAY T90 systems that support IEEE arithmetic, the following return
     values occur:

     ABS(x):

	  |x| =	infinity, result is infinity

	  x =  NaN, result is NaN

     CABS(x):

	  x or y = NaN,	result is NaN

	  |x| =	infinity and y is not NaN, result is infinity

	  |y| =	inf and	x is not NaN, result is	infinity

     When overflow occurs for good input, infinity is returned.

SEE ALSO    [Toc]    [Back]

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

[ Back ]
 Similar pages
Name OS Title
cry2mips IRIX Converts Fortran data types between Cray Fortran data types and MIPS IEEE Fortran data types
adb HP-UX absolute debugger
llabs FreeBSD returns absolute value
imaxabs FreeBSD returns absolute value
abs NetBSD integer absolute value function
abs OpenBSD integer absolute value function
abs FreeBSD integer absolute value function
abs IRIX return integer absolute value
abs Linux compute the absolute value of an integer.
fabs Tru64 Calculate Euclidean distance and absolute value
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service