Decimal integral rounding #
IEEE 754-2019 §§5.3.1 and 5.4.1 use the preferred quantum max(Q(x), 0).
Rounding to the integer grid never increases a valid finite coefficient. If the
preferred quantum is representable, the result fits without additional precision
rounding. A custom layout whose maximum quantum is negative cannot store this
preferred quantum; this binding returns invalid through quantizeMagnitude.
Both APIs preserve the sign of a successful zero result; the exact variant signals
numerical inexactness.
Round to an integral decimal value in the supplied rounding direction, signaling inexact. The mode argument represents the current rounding-direction attribute. An unrepresentable preferred quantum produces invalid, including on custom layouts.
Instances For
Integral rounding with an explicit direction, without signaling inexact.
Instances For
Round to the nearest integral value, choosing the even integer at a tie.
Instances For
Round to the nearest integral value, choosing away from zero at a tie.
Instances For
Round to an integral value toward zero, without signaling inexact.
Instances For
Round to an integral value toward positive infinity, without signaling inexact.
Instances For
Round to an integral value toward negative infinity, without signaling inexact.