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

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

Contents


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

NAME    [Toc]    [Back]

     SELECTED_REAL_KIND	- Returns the real kind	type parameter

SYNOPSIS    [Toc]    [Back]

     SELECTED_REAL_KIND	([[P=]p] [,[R=]r])

IMPLEMENTATION    [Toc]    [Back]

     UNICOS, UNICOS/mk,	and IRIX systems

STANDARDS    [Toc]    [Back]

     Fortran 90

DESCRIPTION    [Toc]    [Back]

     The SELECTED_REAL_KIND intrinsic function returns the real	kind type
     parameter of a real data type with	decimal	precision of at	least p
     digits and	a decimal exponent range of at least r.	 At least one
     argument must be present, and the arguments are as	follows:

     p	  Must be scalar and of	type integer

     r	  Must be scalar and of	type integer

     SELECTED_REAL_KIND	is a transformational function.	 The name of this
     intrinsic cannot be passed	as an argument.

RETURN VALUES    [Toc]    [Back]

     This intrinsic function returns the real kind type	parameter
     corresponding to the decimal precision and	exponent range specified by
     its arguments.  The result	is a default integer scalar.  The result
     has a value equal to a value of the kind type parameter of	a real data
     type with decimal precision, as returned by the function PRECISION, of
     at	least p	digits and a decimal exponent range, as	returned by the
     function RANGE, of	at least r, or if no such kind type parameter
     exists, the result	is -1 if the precision is not available, -2 if the
     exponent range is not available, and -3 if	neither	is available.  If
     more than one kind	type parameter value meets the criteria, the value
     returned is the one with the smallest decimal precision, unless there
     are several such values, in which case the	smallest of these kind
     values is returned.

EXAMPLES    [Toc]    [Back]

     On	UNICOS and UNICOS/mk systems, the following program is run:

	 PARAMETER (NP=9,NR=9)
	 INTEGER P(NP),R(NR),A(NR),B(NP)
	 DATA P	/-1,0,1,6,7,13,14,28,29/
	 DATA R	/-1,0,1,37,38,307,308,2465,2466/
	 WRITE (6,FMT='('' (P,R)|'',10I5)') R
	 WRITE(6,FMT='(" ----------------------------------------------")')
	 DO I=1,NP
	   DO J=1,NR
	     A(J)=SELECTED_REAL_KIND(P(I),R(J))
	   END DO
	   WRITE (6,FMT='(I6,''|'',10I5)') P(I),(A(K),K=1,NR)
	 END DO

	 WRITE(6,FMT='(//)')
	 WRITE (6,FMT='('' (P)	| (R=NULL)'',10I5)')
	 WRITE(6,FMT='(" ----------------------------------------------")')
	 DO I=1,NP
	     B(I)=SELECTED_REAL_KIND(P=P(I))
	 END DO
	 WRITE (6,FMT='(I6,''|'',I5)') (P(K),B(K),K=1,NP)

	 WRITE(6,FMT='(//)')
	 WRITE (6,FMT='('' (P=NULL)| (R)'',10I5)') R
	 WRITE(6,FMT='(" ----------------------------------------------")')
	 DO J=1,NR
	     A(J)=SELECTED_REAL_KIND(R=R(J))
	 END DO
	 WRITE (6,FMT='(I9,''|	  '',10I5)') 0,(A(K),K=1,NR)

	 STOP
	 END

     On	IRIX systems, the following program is run:

	 PARAMETER (NP=9,NR=9)
	 INTEGER P(NP),R(NR),A(NR)
   *	 TEST CASE FOR IRIX
	 DATA P	/-1,0,1,6,7,15,16,31,32/
	 DATA R	/-1,0,1,37,38,291,292,307,308/
	 WRITE (6,FMT='('' (P,R)|'',10I5)') R
	 WRITE(6,FMT='(" ----------------------------------------------",
       +	      "-----------------------")')
	 DO I=1,NP
	   DO J=1,NR
	     A(J)=SELECTED_REAL_KIND(P(I),R(J))
	   END DO
	   WRITE (6,FMT='(I6,''|'',10I5)') P(I),(A(K),K=1,NR)
	 END DO

	 WRITE(6,FMT='(//)')
	 WRITE (6,FMT='('' (P)	| (R=NULL)'',10I5)')
	 WRITE(6,FMT='(" ----------------------------------------------")')
	 DO I=1,NP
	     A(I)=SELECTED_REAL_KIND(P=P(I))
	 END DO
	 WRITE (6,FMT='(I6,''|'',I5)') (P(K),A(K),K=1,NP)

	 WRITE(6,FMT='(//)')
	 WRITE (6,FMT='('' (P=NULL)| (R)'',10I5)') R
	 WRITE(6,FMT='(" ----------------------------------------------",
       +	      "------------------------------")')
	 DO J=1,NR
	     A(J)=SELECTED_REAL_KIND(R=R(J))
	 END DO
	 WRITE (6,FMT='(I9,''|	  '',10I5)') 0,(A(K),K=1,NR)

	 STOP
	 END

     The following tables show the results obtained from the preceding
     programs.

     Return values on CRAY Y-MP	M90 systems and	CRAY Y-MP E systems:

	   (p,r) |   -1	   0	1   37	 38  307  309 2465 2466
	   ----------------------------------------------------
	      -1 |    4	   4	4    4	  4    4    4	 4   -2
	       0 |    4	   4	4    4	  4    4    4	 4   -2
	       1 |    4	   4	4    4	  4    4    4	 4   -2
	       6 |    4	   4	4    4	  4    4    4	 4   -2
	       7 |    8	   8	8    8	  8    8    8	 8   -2
	      13 |    8	   8	8    8	  8    8    8	 8   -2
	      14 |   16	  16   16   16	 16   16   16	16   -2
	      28 |   16	  16   16   16	 16   16   16	16   -2
	      29 |   -1	  -1   -1   -1	 -1   -1   -1	-1   -3

	     (p) | (r=NULL)
	   ---------------
	      -1 |   4
	       0 |   4
	       1 |   4
	       6 |   4
	       7 |   8
	      13 |   8
	      14 |  16
	      28 |  16
	      29 |  -1

	   (p=NULL) | (r)  -1	 0    1	  37   38  307	309 2465 2466
	   ----------------------------------------------------------
		  0 |	    4	 4    4	   4	4    4	  4    4   -2

     Return values on IRIX systems:

	 (p,r) |   -1	 0    1	  37   38  291	292  307  308
	 ------------------------------------------------------------------
	    -1 |    4	 4    4	   4	8    8	  8    8   -2
	     0 |    4	 4    4	   4	8    8	  8    8   -2
	     1 |    4	 4    4	   4	8    8	  8    8   -2
	     6 |    4	 4    4	   4	8    8	  8    8   -2
	     7 |    8	 8    8	   8	8    8	  8    8   -2
	    15 |    8	 8    8	   8	8    8	  8    8   -2
	    16 |   16	16   16	  16   16   -2	 -2   -2   -2
	    31 |   16	16   16	  16   16   -2	 -2   -2   -2
	    32 |   -1	-1   -1	  -1   -1   -1	 -1   -1   -3

	     (p) | (r=NULL)
	   ----------------
	      -1 |    4
	       0 |    4
	       1 |    4
	       6 |    4
	       7 |    8
	      15 |    8
	      16 |   16
	      31 |   16
	      32 |   -1

	   (p=NULL) | (r)   -1	  0    1   37	38  291	 292  307  308
	   -----------------------------------------------------------
		  0 |	     4	  4    4    4	 8    8	   8	8   -2

     Return values on CRAY T90 (IEEE) systems:

	   (p,r) |   -1	   0	1   37	 38  307  308 4931 4932
	   ----------------------------------------------------
	      -1 |    4	   4	4    4	  8    8   16	16   -2
	       0 |    4	   4	4    4	  8    8   16	16   -2
	       1 |    4	   4	4    4	  8    8   16	16   -2
	       6 |    4	   4	4    4	  8    8   16	16   -2
	       7 |    8	   8	8    8	  8    8   16	16   -2
	      15 |    8	   8	8    8	  8    8   16	16   -2
	      16 |   16	  16   16   16	 16   16   16	16   -2
	      33 |   16	  16   16   16	 16   16   16	16   -2
	      34 |   -1	  -1   -1   -1	 -1   -1   -1	-1   -3

	     (p) | (r=NULL)
	   ----------------
	      -1 |    4
	       0 |    4
	       1 |    4
	       6 |    4
	       7 |    8
	      15 |    8
	      16 |   16
	      33 |   16
	      34 |   -1

	   (p=NULL) | (r)   -1	  0    1   37	38  307	 308 4931 4932
	   -----------------------------------------------------------
		  0 |	     4	  4    4    4	 8    8	  16   16   -2

SEE ALSO    [Toc]    [Back]

      
      
     MODELS(3I)

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

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

NAME    [Toc]    [Back]

     SELECTED_REAL_KIND	- Returns the real kind	type parameter

SYNOPSIS    [Toc]    [Back]

     SELECTED_REAL_KIND	([[P=]p] [,[R=]r])

IMPLEMENTATION    [Toc]    [Back]

     UNICOS, UNICOS/mk,	and IRIX systems

STANDARDS    [Toc]    [Back]

     Fortran 90

DESCRIPTION    [Toc]    [Back]

     The SELECTED_REAL_KIND intrinsic function returns the real	kind type
     parameter of a real data type with	decimal	precision of at	least p
     digits and	a decimal exponent range of at least r.	 At least one
     argument must be present, and the arguments are as	follows:

     p	  Must be scalar and of	type integer

     r	  Must be scalar and of	type integer

     SELECTED_REAL_KIND	is a transformational function.	 The name of this
     intrinsic cannot be passed	as an argument.

RETURN VALUES    [Toc]    [Back]

     This intrinsic function returns the real kind type	parameter
     corresponding to the decimal precision and	exponent range specified by
     its arguments.  The result	is a default integer scalar.  The result
     has a value equal to a value of the kind type parameter of	a real data
     type with decimal precision, as returned by the function PRECISION, of
     at	least p	digits and a decimal exponent range, as	returned by the
     function RANGE, of	at least r, or if no such kind type parameter
     exists, the result	is -1 if the precision is not available, -2 if the
     exponent range is not available, and -3 if	neither	is available.  If
     more than one kind	type parameter value meets the criteria, the value
     returned is the one with the smallest decimal precision, unless there
     are several such values, in which case the	smallest of these kind
     values is returned.

EXAMPLES    [Toc]    [Back]

     On	UNICOS and UNICOS/mk systems, the following program is run:

	 PARAMETER (NP=9,NR=9)
	 INTEGER P(NP),R(NR),A(NR),B(NP)
	 DATA P	/-1,0,1,6,7,13,14,28,29/
	 DATA R	/-1,0,1,37,38,307,308,2465,2466/
	 WRITE (6,FMT='('' (P,R)|'',10I5)') R
	 WRITE(6,FMT='(" ----------------------------------------------")')
	 DO I=1,NP
	   DO J=1,NR
	     A(J)=SELECTED_REAL_KIND(P(I),R(J))
	   END DO
	   WRITE (6,FMT='(I6,''|'',10I5)') P(I),(A(K),K=1,NR)
	 END DO

	 WRITE(6,FMT='(//)')
	 WRITE (6,FMT='('' (P)	| (R=NULL)'',10I5)')
	 WRITE(6,FMT='(" ----------------------------------------------")')
	 DO I=1,NP
	     B(I)=SELECTED_REAL_KIND(P=P(I))
	 END DO
	 WRITE (6,FMT='(I6,''|'',I5)') (P(K),B(K),K=1,NP)

	 WRITE(6,FMT='(//)')
	 WRITE (6,FMT='('' (P=NULL)| (R)'',10I5)') R
	 WRITE(6,FMT='(" ----------------------------------------------")')
	 DO J=1,NR
	     A(J)=SELECTED_REAL_KIND(R=R(J))
	 END DO
	 WRITE (6,FMT='(I9,''|	  '',10I5)') 0,(A(K),K=1,NR)

	 STOP
	 END

     On	IRIX systems, the following program is run:

	 PARAMETER (NP=9,NR=9)
	 INTEGER P(NP),R(NR),A(NR)
   *	 TEST CASE FOR IRIX
	 DATA P	/-1,0,1,6,7,15,16,31,32/
	 DATA R	/-1,0,1,37,38,291,292,307,308/
	 WRITE (6,FMT='('' (P,R)|'',10I5)') R
	 WRITE(6,FMT='(" ----------------------------------------------",
       +	      "-----------------------")')
	 DO I=1,NP
	   DO J=1,NR
	     A(J)=SELECTED_REAL_KIND(P(I),R(J))
	   END DO
	   WRITE (6,FMT='(I6,''|'',10I5)') P(I),(A(K),K=1,NR)
	 END DO

	 WRITE(6,FMT='(//)')
	 WRITE (6,FMT='('' (P)	| (R=NULL)'',10I5)')
	 WRITE(6,FMT='(" ----------------------------------------------")')
	 DO I=1,NP
	     A(I)=SELECTED_REAL_KIND(P=P(I))
	 END DO
	 WRITE (6,FMT='(I6,''|'',I5)') (P(K),A(K),K=1,NP)

	 WRITE(6,FMT='(//)')
	 WRITE (6,FMT='('' (P=NULL)| (R)'',10I5)') R
	 WRITE(6,FMT='(" ----------------------------------------------",
       +	      "------------------------------")')
	 DO J=1,NR
	     A(J)=SELECTED_REAL_KIND(R=R(J))
	 END DO
	 WRITE (6,FMT='(I9,''|	  '',10I5)') 0,(A(K),K=1,NR)

	 STOP
	 END

     The following tables show the results obtained from the preceding
     programs.

     Return values on CRAY Y-MP	M90 systems and	CRAY Y-MP E systems:

	   (p,r) |   -1	   0	1   37	 38  307  309 2465 2466
	   ----------------------------------------------------
	      -1 |    4	   4	4    4	  4    4    4	 4   -2
	       0 |    4	   4	4    4	  4    4    4	 4   -2
	       1 |    4	   4	4    4	  4    4    4	 4   -2
	       6 |    4	   4	4    4	  4    4    4	 4   -2
	       7 |    8	   8	8    8	  8    8    8	 8   -2
	      13 |    8	   8	8    8	  8    8    8	 8   -2
	      14 |   16	  16   16   16	 16   16   16	16   -2
	      28 |   16	  16   16   16	 16   16   16	16   -2
	      29 |   -1	  -1   -1   -1	 -1   -1   -1	-1   -3

	     (p) | (r=NULL)
	   ---------------
	      -1 |   4
	       0 |   4
	       1 |   4
	       6 |   4
	       7 |   8
	      13 |   8
	      14 |  16
	      28 |  16
	      29 |  -1

	   (p=NULL) | (r)  -1	 0    1	  37   38  307	309 2465 2466
	   ----------------------------------------------------------
		  0 |	    4	 4    4	   4	4    4	  4    4   -2

     Return values on IRIX systems:

	 (p,r) |   -1	 0    1	  37   38  291	292  307  308
	 ------------------------------------------------------------------
	    -1 |    4	 4    4	   4	8    8	  8    8   -2
	     0 |    4	 4    4	   4	8    8	  8    8   -2
	     1 |    4	 4    4	   4	8    8	  8    8   -2
	     6 |    4	 4    4	   4	8    8	  8    8   -2
	     7 |    8	 8    8	   8	8    8	  8    8   -2
	    15 |    8	 8    8	   8	8    8	  8    8   -2
	    16 |   16	16   16	  16   16   -2	 -2   -2   -2
	    31 |   16	16   16	  16   16   -2	 -2   -2   -2
	    32 |   -1	-1   -1	  -1   -1   -1	 -1   -1   -3

	     (p) | (r=NULL)
	   ----------------
	      -1 |    4
	       0 |    4
	       1 |    4
	       6 |    4
	       7 |    8
	      15 |    8
	      16 |   16
	      31 |   16
	      32 |   -1

	   (p=NULL) | (r)   -1	  0    1   37	38  291	 292  307  308
	   -----------------------------------------------------------
		  0 |	     4	  4    4    4	 8    8	   8	8   -2

     Return values on CRAY T90 (IEEE) systems:

	   (p,r) |   -1	   0	1   37	 38  307  308 4931 4932
	   ----------------------------------------------------
	      -1 |    4	   4	4    4	  8    8   16	16   -2
	       0 |    4	   4	4    4	  8    8   16	16   -2
	       1 |    4	   4	4    4	  8    8   16	16   -2
	       6 |    4	   4	4    4	  8    8   16	16   -2
	       7 |    8	   8	8    8	  8    8   16	16   -2
	      15 |    8	   8	8    8	  8    8   16	16   -2
	      16 |   16	  16   16   16	 16   16   16	16   -2
	      33 |   16	  16   16   16	 16   16   16	16   -2
	      34 |   -1	  -1   -1   -1	 -1   -1   -1	-1   -3

	     (p) | (r=NULL)
	   ----------------
	      -1 |    4
	       0 |    4
	       1 |    4
	       6 |    4
	       7 |    8
	      15 |    8
	      16 |   16
	      33 |   16
	      34 |   -1

	   (p=NULL) | (r)   -1	  0    1   37	38  307	 308 4931 4932
	   -----------------------------------------------------------
		  0 |	     4	  4    4    4	 8    8	  16   16   -2

SEE ALSO    [Toc]    [Back]

      
      
     MODELS(3I)

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

[ Back ]
 Similar pages
Name OS Title
kind IRIX Returns the value of the kind type parameter of x
selected_int_kind IRIX Returns an integer kind type parameter
selected IRIX 0- return a kind type parameter given a decimal exponent range or precision.
clGetName IRIX returns a name for a parameter
AUpvnew IRIX Audio File parameter value list data type
XmRepTypeGetRecord IRIX A representation type manager function that returns information about a representation type
XmRepTypeGetRecord HP-UX A representation type manager function that returns information about a representation type
XmRepTypeGetRecord Tru64 A representation type manager function that returns information about a representation type
XmStringGetNextTriple HP-UX An XmString function that returns the type, length, and value of the next component in the compound string
XmRepTypeGetRegistered Tru64 A representation type manager function that returns a copy of the registration list
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service