Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 9/08/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

IEEE_SELECTED_REAL_KIND

Transformational Module Intrinsic Function (Generic): Returns the value of the kind parameter of an IEEE REAL data type.

Module

USE, INTRINSIC :: IEEE_ARITHMETIC

result = IEEE_SELECTED_REAL_KIND ([p][,r][,radix])

p

(Input; optional) Must be scalar and of type INTEGER.

r

(Input; optional) Must be scalar and of type INTEGER.

radix

(Input; optional) Must be scalar and of type INTEGER.

At least argument p or r must be present.

Results

If p or r is absent, the result is as if the argument was present with the value zero. If radix is absent, there is no requirement on the radix of the selected kind.

The result is a scalar of type default integer. The result has a value equal to a value of the kind parameter of an IEEE real data type with decimal precision, as returned by the function PRECISION, of at least p digits, a decimal exponent range, as returned by the function RANGE, of at least r, and a radix, as returned by the function RADIX, of radix.

If no such kind type parameter is available on the processor, the result is as follows:

  • -1 if the precision is not available

  • -2 if the exponent range is not available

  • -3 if neither the precision nor the exponent range is available

  • -4 if one but not both of the precision and the exponent range is available

  • -5 if the radix is not available

If more than one kind type parameter value meets the criteria, the value returned is the one with the smallest decimal precision.

Example

IEEE_SELECTED_REAL_KIND (6, 70, 2) = 8.