Parma Polyhedra Library requirements
C++ ordinary interval arithmetic
PPL-SPEC-000729
1. Ordinary interval additive inversion PPL-SPEC-000729

neg_assign(x) shall replace the receiver by an outward interval enclosure of { − a ∣ a ∈ X}, where X is the source entry set. Empty shall give empty. With exact admitted endpoint operations and supported endpoint membership, the result shall be exact: source upper/lower endpoints shall become negated lower/upper endpoints, with their respective membership interchanged. Unbounded lower/upper extents shall exchange sign and side. An inexact conversion or unsupported openness shall enlarge the result without excluding source images.

Operands shall be initialized and valid intervals or admitted finite scalar singletons over the ordinary real carrier. The receiving policy shall admit the result, including empty and unbounded sets where required. Active rational payloads shall be canonical. The selected source/destination numerical combinations shall have well-formed underlying endpoint operations; the generic signatures shall not promise every possible cross-family instantiation. Each selected operation and all its intermediates shall satisfy the boundary type's range, resource, policy, shared-temporary and caller-owned FPU prerequisites. Separate operands shall remain unchanged. The receiver may alias an interval operand or both interval operands; scalar references shall not borrow numerical storage overwritten during the operation. Access shall be synchronized against mutation. No additional library initialization shall be required. Underlying failure shall retain the underlying numerical/allocation guarantees; a general rollback guarantee shall not be implied. Returned I_Result values shall obey the logical shape/status meanings of 🔗 1. Interval result possibilities and status-flag set operations; only established claims shall be reported.

2. Ordinary interval addition and subtraction PPL-SPEC-000730

add_assign(x,y) shall enclose {a + b ∣ a ∈ X, b ∈ Y}; sub_assign(x,y) shall enclose {a − b ∣ a ∈ X, b ∈ Y}. An empty operand shall give empty. With exact admitted endpoint operations and supported endpoint membership, these interval images shall be exact. For finite nonempty operands, addition shall use the sums of lower endpoints and upper endpoints. Subtraction shall use the first lower minus second upper endpoint, and first upper minus second lower endpoint. An extremum shall be attained exactly when both required source extrema are attained. Ordinary unbounded extents shall propagate according to these set images. Inexact conversion or unsupported openness may enlarge the result.

Operands shall be initialized and valid intervals or admitted finite scalar singletons over the ordinary real carrier. The receiving policy shall admit the result, including empty and unbounded sets where required. Active rational payloads shall be canonical. The selected source/destination numerical combinations shall have well-formed underlying endpoint operations; the generic signatures shall not promise every possible cross-family instantiation. Each selected operation and all its intermediates shall satisfy the boundary type's range, resource, policy, shared-temporary and caller-owned FPU prerequisites. Separate operands shall remain unchanged. The receiver may alias an interval operand or both interval operands; scalar references shall not borrow numerical storage overwritten during the operation. Access shall be synchronized against mutation. No additional library initialization shall be required. Underlying failure shall retain the underlying numerical/allocation guarantees; a general rollback guarantee shall not be implied. Returned I_Result values shall obey the logical shape/status meanings of 🔗 1. Interval result possibilities and status-flag set operations; only established claims shall be reported.

3. Ordinary interval multiplication PPL-SPEC-000731

mul_assign(x,y) shall enclose {ab ∣ a ∈ X, b ∈ Y}. An empty operand shall give empty. With exact admitted endpoint operations and supported endpoint membership, the result shall be the exact interval image. For finite nonempty operands its extrema shall be the least and greatest of the four endpoint products. Endpoint membership shall account for every tied extremizer and for an attained zero in either operand; it shall not infer that zero is excluded merely because one nonzero factor approaches an excluded endpoint. Ordinary unbounded endpoints shall retain their limiting meaning, including a singleton zero multiplied by an unbounded interval. Inexact conversion or unsupported openness may enlarge the result.

Operands shall be initialized and valid intervals or admitted finite scalar singletons over the ordinary real carrier. The receiving policy shall admit the result, including empty and unbounded sets where required. Active rational payloads shall be canonical. The selected source/destination numerical combinations shall have well-formed underlying endpoint operations; the generic signatures shall not promise every possible cross-family instantiation. Each selected operation and all its intermediates shall satisfy the boundary type's range, resource, policy, shared-temporary and caller-owned FPU prerequisites. Separate operands shall remain unchanged. The receiver may alias an interval operand or both interval operands; scalar references shall not borrow numerical storage overwritten during the operation. Access shall be synchronized against mutation. No additional library initialization shall be required. Underlying failure shall retain the underlying numerical/allocation guarantees; a general rollback guarantee shall not be implied. Returned I_Result values shall obey the logical shape/status meanings of 🔗 1. Interval result possibilities and status-flag set operations; only established claims shall be reported.

4. Ordinary interval division and zero-divisor abstraction PPL-SPEC-000732

div_assign(x,y) shall enclose {a ⁄ b ∣ a ∈ X, b ∈ Y, b ≠ 0}. An empty operand or a divisor consisting only of zero shall give empty. A divisor with negative and positive values shall give universe as the specified conservative interval abstraction, including when a tighter interval image could be representable. A divisor with only one nonzero sign, possibly with zero as an endpoint, shall retain every defined quotient; zero-denominator pairs shall not become mathematical results. The negative-and-positive divisor branch shall return I_UNIVERSE | I_SINGULARITIES. It shall not infer exactness of the quotient image from exact assignment of the universe representation.

For finite nonempty operands whose divisor has finite endpoints strictly on one side of zero, exact admitted endpoint operations and supported membership shall give the exact interval image. Its extrema shall be the least/greatest of the four endpoint quotients; attainment shall account for all ties and an attained zero numerator. A one-sided divisor approaching zero may require an unbounded endpoint. Inexact conversion or unsupported openness may enlarge the result.

Operands shall be initialized and valid intervals or admitted finite scalar singletons over the ordinary real carrier. The receiving policy shall admit the result, including empty and unbounded sets where required. Active rational payloads shall be canonical. The selected source/destination numerical combinations shall have well-formed underlying endpoint operations; the generic signatures shall not promise every possible cross-family instantiation. Each selected operation and all its intermediates shall satisfy the boundary type's range, resource, policy, shared-temporary and caller-owned FPU prerequisites. Separate operands shall remain unchanged. The receiver may alias an interval operand or both interval operands; scalar references shall not borrow numerical storage overwritten during the operation. Access shall be synchronized against mutation. No additional library initialization shall be required. Underlying failure shall retain the underlying numerical/allocation guarantees; a general rollback guarantee shall not be implied. Returned I_Result values shall obey the logical shape/status meanings of 🔗 1. Interval result possibilities and status-flag set operations; only established claims shall be reported.

PPL-SPEC-000733
5. Ordinary interval arithmetic value operators PPL-SPEC-000733

The free binary +, -, * and / operators shall return an independent interval value of the interval operand's boundary/information type, with the corresponding semantics of 🔗 2. Ordinary interval addition and subtraction, 🔗 3. Ordinary interval multiplication and 🔗 4. Ordinary interval division and zero-divisor abstraction. They shall support two intervals of that type, an interval followed by an admitted scalar singleton, and a scalar followed by an interval. Operand order shall be preserved for subtraction and division. Separate returned values shall not share mutable owned endpoint storage with their operands.

Operands shall satisfy the corresponding assignment operation's numerical, policy and runtime prerequisites. Operand values shall remain unchanged on successful return. Access shall be synchronized with mutation. Allocation or numerical exceptions shall propagate with the corresponding operation's guarantees. No additional library initialization shall be required.