Developer Guide and Reference

ID 767251
Date 10/31/2024
Public
Document Table of Contents

IEEE_SIGNBIT

Elemental Module Intrinsic Function (Generic): Tests to determine if the argument's sign bit is set. This is equivalent to the IEEE isSignMinus operation.

Module

USE, INTRINSIC :: IEEE_ARITHMETIC

Syntax

result = IEEE_SIGNBIT (x)

x

(Input) Must be of type REAL.

Results

The result is a scalar of type default logical. The result has the value .true. if the sign bit of x is set (nonzero); otherwise, it has the value .false.. No exception is signaled even if x has the value of a signaling NaN.

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

Example

The result of IEEE_SIGNBIT (-3.14) is .true..