Parma Polyhedra Library requirements
C++ finite scalar selection and numerical utility predicates
PPL-SPEC-000913
1. Finite same-type minimum and maximum assignment PPL-SPEC-000913

For two live same-type finite ordered numerical values x and y, min_assign(x, y) shall assign the lesser mathematical value and max_assign(x, y) the greater. The admitted types shall be the standard native integer types, native floating types, mpz_class, canonical mpq_class and supported Checked_Number<T, Policy> forms. A strictly selected source shall be copied with independent owned storage. If the two entry values are equal, the destination's entry representation shall remain unchanged, including a native floating zero's sign.

Both functions shall return void. The source may be the destination; every comparison shall use entry values, and a distinct source shall remain unchanged. Checked calls shall require no rounding defaults, implicit conversion capability or result handler, and shall make no result-policy callback. Same-type checked assignment shall retain 🔗 1. Finite checked scalar storage and copying. Mathematical ordering shall retain 🔗 1. Exact scalar sign and ordering and 🔗 2. Mixed finite floating and exact scalar ordering.

Native floating values shall exclude infinities and NaNs. Raw native comparison/assignment shall remain available independently of configured PPL rounded floating kernels; checked floating forms shall require the corresponding configured scalar support. Rational operands shall be finite and canonical. Live objects, synchronized overlapping mutation and sufficient copy-allocation resources shall be required. No library initialization, coefficient-constant stage, FPU direction or policy default shall be required. Hardware direction shall remain unchanged.

PPL-SPEC-000914
2. Finite parity and additive-inverse predicates PPL-SPEC-000914

For finite admitted scalar values, is_even(x) shall return true exactly when the mathematical value of x belongs to 2ℤ. A nonintegral rational or native floating value shall therefore return false. is_additive_inverse(x, y) shall return true exactly when x + y = 0 as a mathematical equality, without evaluating an overflowing native sum or requiring a representable stored negation. Both signs of native floating zero shall denote mathematical zero for these predicates.

The admitted same-type forms shall be raw standard native integers, mpz_class, finite canonical mpq_class, configured supported native floating formats and their supported Checked_Number<T, Policy> forms. Policy-reserved special payloads shall not be finite operands. Every finite endpoint shall be admitted, including a bounded minimum whose mathematical negative is outside the storage range. Checked predicates shall require no rounding default, result handler or implicit conversion capability and shall invoke no policy handler. Each result shall have type bool.

Sources may be the same object and shall remain unchanged. Rational scratch storage and synchronization shall follow 🔗 6. Exact rational operations with powers of two; other live-object, finite/canonical and resource prerequisites shall follow the corresponding scalar family. Floating parity shall satisfy the native nonnegative dyadic residue backend/hardware prerequisites in 🔗 4. Rounded nonnegative native residue modulo a power of two. Additive-inverse comparison shall use exact negation and ordering meanings. No coefficient-constant initialization shall be required. Neither predicate shall change hardware direction.

PPL-SPEC-000915
3. Native low-bit mask construction PPL-SPEC-000915

For an admitted native integral type T with specialized binary std::numeric_limits<T>, let d be its number of value bits, std::numeric_limits<T>::digits. For an unsigned int exponent 0 ≤ n < d, low_bits_mask<T>(n) shall return a T whose mathematical value is 2n − 1. In particular, zero shall produce zero, and exactly the lowest n value bits shall be set.

The admitted types shall include all eleven standard native integer types. Where INT128_AVAILABLE holds, the same template instantiations shall admit the compiler's signed and unsigned native 128-bit types. That capability shall not imply a general PPL public 128-bit scalar arithmetic instantiation. No signed representation bit outside the nonnegative representable range shall be set. The result type shall be exactly T.

The call shall require no source object, policy, initialization stage, allocation, FPU setup or mutable numerical state. Hardware direction shall remain unchanged. Requests outside n < d shall not be admitted.