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

ID 767251
Date 6/24/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_NEXT_UP

Elemental Module Intrinsic Function (Generic): Returns the next higher adjacent machine number. This is equivalent to the IEEE nextUp operation.

Module

USE, INTRINSIC :: IEEE_ARITHMETIC

result = IEEE_NEXT_UP (x)

x

(Input) Must be of type REAL.

Results

The result type and kind are the same as x. The value of the result is the least value that compares greater than x - except when x has the value NaN, the result is NaN, and when x has the value + ∞, the result is + ∞. If x is a signaling NaN, IEEE_INVALID signals; otherwise, no exception is signaled.

This is the nextUp operation as specified in the ISO/IEC 60559:2020 standard.

Example

The value of IEEE_NEXT_UP (HUGE (x)) is + ∞ if the value of IEEE_SUPPORT_INF (x) is .true..