enum class RoundingMode

Description

Rounding mode. Enumerates supported rounding modes, as well as some special values. The set of the modes must agree with IEEE-754, 4.3.1 and 4.3.2. The constants assigned to the IEEE rounding modes must agree with the values used by FLT_ROUNDS (C11, 5.2.4.2.2p8). This value is packed into bitfield in some cases, including \c FPOptions, so the rounding mode values and the special value \c Dynamic must fit into the the bit field (now - 3 bits). The value \c Invalid is used only in values returned by intrinsics to indicate errors, it should never be stored as rounding mode value, so it does not need to fit the bit fields.

Declared at: llvm/include/llvm/ADT/FloatingPointMode.h:36

Enumerators

NameValueComment
TowardZero0roundTowardZero.
NearestTiesToEven1roundTiesToEven.
TowardPositive2roundTowardPositive.
TowardNegative3roundTowardNegative.
NearestTiesToAway4roundTiesToAway.
Dynamic7Denotes mode unknown at compile time.
Invalid-1Denotes invalid value.