Parma Polyhedra Library requirements
C++ configured-coefficient quotient conversion
PPL-SPEC-000918
1. Exact coefficient ratio followed by upward scalar conversion PPL-SPEC-000918

For finite configured-coefficient entry values a and nonzero b, div_round_up(to, x, y) shall form the exact rational ratio a ⁄ b and convert that ratio to the selected scalar destination using ROUND_UP. Neither coefficient shall first be rounded to the destination storage, and an integral intermediate quotient shall not replace the ratio. The ratio's numerator and denominator shall not be constrained by the range of the configured coefficient type.

An admitted destination shall be a native scalar, mpz_class, mpq_class or Checked_Number specialization for which the finite rational assignment is well-formed under its policy and configured scalar availability. For a native-integer destination, or checked native-integer storage, whose upward integer is within its finite policy range, the result shall be ⌈a ⁄ b⌉. An unbounded integer destination shall receive that exact integer; a rational destination shall receive the exact canonical ratio. Supported native floating storage shall receive the upward bound required by 🔗 1. Supported exact integer and rational conversion to native floating storage, 🔗 2. Directed conversion to adjacent finite normal floating-point bounds, 🔗 3. Directed conversion in the subnormal and underflow range, 🔗 4. Delegated and exactness requests for floating-point conversion and 🔗 5. Floating conversion overflow thresholds and computed-value classes. Checked floating storage shall retain the policy admission in 🔗 4. Ordered comparison of finite native floating-point values.

Destination range outcomes and unsupported-payload meaning shall retain 🔗 5. Integral scalar conversion range outcomes and 🔗 6. Rational conversion at and beyond integral endpoints for bounded integral storage. An unchecked bounded policy shall require its admitted representability conditions. The helper shall return void and shall not expose intermediate or final Result values. It shall not invoke a policy handler, consult a constructor/operator/function rounding default, or turn a returned unsupported-result classification into a numeric exception. An unsupported destination outcome shall not promise a represented answer; callers requiring one shall satisfy the selected conversion's range conditions. Allocation and other exceptions escaping the underlying operations shall propagate with their own destination guarantees.

The two source arguments may identify the same coefficient. When its types permit, the destination may be either or both source objects; every source shall be read using its entry value before the destination is written. Distinct sources shall remain unchanged. Objects shall remain live and access shall be synchronized against overlapping modifications. In a non-thread-safe build, calls shall not overlap other PPL operations using shared temporary storage; a thread-safe build shall provide independent per-thread temporaries. Available resources shall limit temporary rational storage. No library/thread initialization or coefficient-constant stage shall be required. Floating conversion shall add only its delegated configured-format prerequisites, require no particular current hardware rounding direction and preserve that direction.