-
Incoming link from: 6. Exact rational arithmetic1
4. Meaning of numerical conversion outcomes PPL-LLR-000004 When a supported numerical conversion distinguishes exact and inexact success, an exact-success outcome shall preserve the source value and an inexact-success outcome shall satisfy the conversion's stated approximation direction.
-
1. Numerical and geometric foundations PPL-HLR-000001 PPL shall provide numerical values and finite-dimensional geometric descriptors with defined mathematical meanings, so that clients can describe numerical problems consistently across the library.
-
-
Incoming links from: 3. Bounded-difference intersection and upper bounds 5. Lifted operations on finite pointset powersets 6. Compound extrapolation and finite convergence 1. Coordinate removal and existential projection 4. Sound conversion between numerical abstractions 5. Constraint and congruence refinement 6. Sound affine forward and backward transfers 7. Domain-specific time-elapse abstraction 8. Abstract set-difference semantics 11. Preservation of integer points in integer restriction 12. Modeled bounded-integer arithmetic and wrapping 14. Directional bounds, extrema and attainment 1. Dimension-preserving coordinate forgetting 2. Concatenation, coordinate expansion and folding 3. Narrowing and descending precision recovery 2. Sound successful floating-point linearization 3. Explicit failure of unsupported expression approximation 4. Conservative arithmetic on interval linear forms 2. Affine meaning of linear expressions 3. Sound interval arithmetic 4. Explicit numerical operation contracts 1. Exact integral coefficient calculations 3. Conservative directed numerical bounds 4. Meaning of numerical conversion outcomes 5. Integer quotient and remainder semantics 6. Exact rational arithmetic 3. Octagonal intersection and upper bounds27
1. Meaning of successful exact and approximate results PPL-LLR-000301 For valid inputs under an operation's stated arithmetic and resource assumptions, a successfully reported exact result shall have the specified mathematical meaning, and a successfully reported conservative over-approximation shall contain every concrete result admitted by those inputs.
-
11. Sound and explicit numerical guarantees PPL-HLR-000011 PPL shall distinguish exact numerical results, conservative approximations and inconclusive outcomes, and shall make the assumptions and precision guarantees of each numerical operation explicit.
-
-
4. Explicit numerical operation contracts PPL-LLR-000442 Each supported numerical operation shall have an explicit contract identifying its concrete meaning, the conditions of its numerical guarantees, and the meaning of its exact, approximate, inconclusive and failure outcomes, as applicable. The contract shall identify its applicable domain, numerical profile and interface contexts; restrictions on availability or precision shall be consistent with the required facility and selected configuration.
-
11. Sound and explicit numerical guarantees PPL-HLR-000011 PPL shall distinguish exact numerical results, conservative approximations and inconclusive outcomes, and shall make the assumptions and precision guarantees of each numerical operation explicit.
-
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.