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

ID 767251
Date 3/22/2024
Public

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

Document Table of Contents

IEEE_VALUE

Elemental Module Intrinsic Function (Generic): Creates an IEEE value.

Module

USE, INTRINSIC :: IEEE_ARITHMETIC

result = IEEE_VALUE (x, class)

x

(Input) Must be of type REAL.

class

(Input) Must be of type TYPE (IEEE_CLASS_TYPE). Its value is one of the following:

IEEE_SIGNALING_NAN

IEEE_NEGATIVE_NORMAL

IEEE_QUIET_NAN

IEEE_POSITIVE_DENORMAL

IEEE_POSITIVE_INF

IEEE_NEGATIVE_DENORMAL

IEEE_NEGATIVE_INF

IEEE_POSITIVE_ZERO

IEEE_POSITIVE_NORMAL

IEEE_NEGATIVE_ZERO

Results

The result type and kind are the same as x. The result value is an IEEE value as specified by "class".

When IEEE_VALUE returns a signaling NaN, it is processor dependent whether or not invalid is signaled and processor dependent whether or not the signaling NaN is converted to a quiet NaN.

Example

IEEE_VALUE (1.0,IEEE_POSITIVE_INF) has the value +infinity.