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

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

Contents


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

NAME    [Toc]    [Back]

     IEEE_EXPONENT - Returns the unbiased exponent of x

SYNOPSIS    [Toc]    [Back]

     IEEE_EXPONENT ([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_EXPONENT intrinsic function returns the unbiased exponent	of
     x.	 This function corresponds to the logb function	described in the
     IEEE standard appendix of recommended functions.

     The IEEE_EXPONENT function	accepts	the following arguments:

     x	       Must be of type real.  Can be a scalar or array value.

     y	       Can be of type integer or real.	Must be	a scalar value.

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

RESULT TYPE AND	TYPE PARAMETER
     If	x is a scalar, the result is a scalar.	If x is	an array, the
     result is an array	of the same shape as x.

     If	y is absent, the result	is of type default integer.

     If	y is present and is of type integer, the result	is of type integer
     and has the same kind type	parameter value	as y.

     If	y is present and is of type real, the result is	of type	real and
     has the same kind type parameter value as y.

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 result	is the value of	the unbiased exponent of x.

     If	y is absent and	x is +inf, -inf, or NaN, the result is HUGE(0).	 If
     x is 0.0, the result is -HUGE(0).

     If	y is present and of type integer and x is +inf,	-inf, or NaN, the
     result is HUGE(y).	 If x is 0.0, the result is -HUGE(y).

     If	y is present and of type real, the value is an integral	value in
     floating-point format.  If	x is a NaN, the	result is a NaN.  If x is
     +inf or -inf, the result is +inf.	If x is	0.0, the result	is -inf	and
     the division by zero exception is raised.

     When x is positive	and finite, the	expression IEEE_BINARY_SCALE(X,
     -IEEE_EXPONENT(X))	lies strictly between 0	and 2; it is less than 1
     only when x is denormalized.

EXAMPLES    [Toc]    [Back]

     Example 1.

	  REAL	 x
	  ...		      !	Compute	X.
	  PRINT	*, "Unbiased exponent of X:", IEEE_EXPONENT(x)

     The PRINT statement prints	the unbiased exponent of x as a	default
     integer value as long as x	is not one of the exceptional values noted
     in	the RETURN VALUES section.

     Example 2.	 Program ieexp.f90 uses	several	intrinsic procedures:

		REAL(8)	X

		PRINT *," TEST EXPONENT	and IEEE_EXPONENT of HUGE"
		X = HUGE(1.0_8)

	  ! HUGE scaled	to 0.xxx
		PRINT *," F90 EXPONENT of x=",EXPONENT(x)

	  ! HUGE scaled	to x.xx
		PRINT *," Unbiased IEEE_EXPONENT of x=",IEEE_EXPONENT(x)

		PRINT *," TEST EXPONENT	and IEEE_EXPONENT of TINY"
		X = TINY(1.0_8)

	  ! TINY scaled	to 0.xxx
		PRINT *," F90 EXPONENT of x=",EXPONENT(x)

	  ! TINY scaled	to x.xx
		PRINT *," Unbiased IEEE_EXPONENT of x=",IEEE_EXPONENT(x)
		END

     The output	from this program is as	follows:

	    TEST EXPONENT and IEEE_EXPONENT of HUGE
	    F90	EXPONENT of x= 1024
	    Unbiased IEEE_EXPONENT of x= 1023
	    TEST EXPONENT and IEEE_EXPONENT of TINY
	    F90	EXPONENT of x= -1021
	    Unbiased IEEE_EXPONENT of x= -1022

SEE ALSO    [Toc]    [Back]

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

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

NAME    [Toc]    [Back]

     IEEE_EXPONENT - Returns the unbiased exponent of x

SYNOPSIS    [Toc]    [Back]

     IEEE_EXPONENT ([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_EXPONENT intrinsic function returns the unbiased exponent	of
     x.	 This function corresponds to the logb function	described in the
     IEEE standard appendix of recommended functions.

     The IEEE_EXPONENT function	accepts	the following arguments:

     x	       Must be of type real.  Can be a scalar or array value.

     y	       Can be of type integer or real.	Must be	a scalar value.

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

RESULT TYPE AND	TYPE PARAMETER
     If	x is a scalar, the result is a scalar.	If x is	an array, the
     result is an array	of the same shape as x.

     If	y is absent, the result	is of type default integer.

     If	y is present and is of type integer, the result	is of type integer
     and has the same kind type	parameter value	as y.

     If	y is present and is of type real, the result is	of type	real and
     has the same kind type parameter value as y.

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 result	is the value of	the unbiased exponent of x.

     If	y is absent and	x is +inf, -inf, or NaN, the result is HUGE(0).	 If
     x is 0.0, the result is -HUGE(0).

     If	y is present and of type integer and x is +inf,	-inf, or NaN, the
     result is HUGE(y).	 If x is 0.0, the result is -HUGE(y).

     If	y is present and of type real, the value is an integral	value in
     floating-point format.  If	x is a NaN, the	result is a NaN.  If x is
     +inf or -inf, the result is +inf.	If x is	0.0, the result	is -inf	and
     the division by zero exception is raised.

     When x is positive	and finite, the	expression IEEE_BINARY_SCALE(X,
     -IEEE_EXPONENT(X))	lies strictly between 0	and 2; it is less than 1
     only when x is denormalized.

EXAMPLES    [Toc]    [Back]

     Example 1.

	  REAL	 x
	  ...		      !	Compute	X.
	  PRINT	*, "Unbiased exponent of X:", IEEE_EXPONENT(x)

     The PRINT statement prints	the unbiased exponent of x as a	default
     integer value as long as x	is not one of the exceptional values noted
     in	the RETURN VALUES section.

     Example 2.	 Program ieexp.f90 uses	several	intrinsic procedures:

		REAL(8)	X

		PRINT *," TEST EXPONENT	and IEEE_EXPONENT of HUGE"
		X = HUGE(1.0_8)

	  ! HUGE scaled	to 0.xxx
		PRINT *," F90 EXPONENT of x=",EXPONENT(x)

	  ! HUGE scaled	to x.xx
		PRINT *," Unbiased IEEE_EXPONENT of x=",IEEE_EXPONENT(x)

		PRINT *," TEST EXPONENT	and IEEE_EXPONENT of TINY"
		X = TINY(1.0_8)

	  ! TINY scaled	to 0.xxx
		PRINT *," F90 EXPONENT of x=",EXPONENT(x)

	  ! TINY scaled	to x.xx
		PRINT *," Unbiased IEEE_EXPONENT of x=",IEEE_EXPONENT(x)
		END

     The output	from this program is as	follows:

	    TEST EXPONENT and IEEE_EXPONENT of HUGE
	    F90	EXPONENT of x= 1024
	    Unbiased IEEE_EXPONENT of x= 1023
	    TEST EXPONENT and IEEE_EXPONENT of TINY
	    F90	EXPONENT of x= -1021
	    Unbiased IEEE_EXPONENT of x= -1022

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
ilogb Tru64 Returns an unbiased exponent
maxexponent IRIX Returns the maximum exponent in the numeric model
exponent IRIX Returns the exponent part of the argument when represented as a numeric model number
minexponent IRIX Returns the minimum (most negative) exponent of a real number in the numeric model
range IRIX Returns the decimal exponent range of a number according to the real or integer model
set_exponent IRIX Sets exponent part of a number
selected IRIX 0- return a kind type parameter given a decimal exponent range or precision.
clGetName IRIX returns a name for a parameter
ieee_copy_sign IRIX Returns x with the sign of y
ieee_binary_scale IRIX Returns y multiplied by 2**n
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service