Internal interval boundary arithmetic
|
Type
|
Level
|
MID
|
UID
|
REFS
|
Title
|
Statement
|
Rationale
|
Comment
|
BIBLIOGRAPHY
|
STATUS
|
COMPONENT
|
APPLICABILITY
|
VERIFICATION_METHODS
|
VERIFICATION_CRITERIA
|
SOURCE
|
LANGUAGE
|
VISIBILITY
|
INTERFACE
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
SW_SPEC
|
1 |
|
|
|
add_assign and sub_assign shall form outward selected endpoint candidates for the sum or difference of the two source entry values. Addition shall admit equal source sides; subtraction shall admit opposite source sides. The selected source/destination sides shall give the appropriate extremum: a natural infinite result shall have the receiving side's sign. The owning interval's additive endpoint selection shall retain 🔗 2. Ordinary interval addition and subtraction. For finite operands, the exact candidate value shall be a + b or a − b; endpoint exclusion shall be required when either selected source endpoint is excluded. Numerical evaluation shall use the receiving side's outward direction and request sufficient relation information for membership under 🔗 1. Normalization of numerical results into boundary properties. When a selected source is naturally infinite, the output shall be the appropriate natural infinity. It shall include that infinity exactly when an applicable naturally infinite source includes its infinity; all such source infinities excluded shall require exclusion. Natural-infinity classification and inclusion shall use 🔗 1. Boundary infinity and scalar-domain extremum interpretation and 🔗 2. Boundary openness and infinity membership interpretation. Indeterminate extended arithmetic shall be resolved by the owning interval before selecting this endpoint operation. Selected destination properties shall meet the replacement or compatible composition conditions of 🔗 2. Same-side outward boundary conversion and retained properties. Result normalization, retained selected properties, unrelated/opposite-side metadata and cached interval claims shall obey 🔗 1. Normalization of numerical results into boundary properties. Exact representable values and supported membership distinctions shall yield the exact selected cut; other numerical outcomes shall give an outward receiving cut. Active source payloads shall be initialized, valid and canonical where required. Metadata-encoded infinity shall not require evaluation of an inactive payload. Scalar types, numerical kernels, intermediate arithmetic, resource bounds, policy checks, shared-temporary synchronization and caller-owned FPU state shall meet the selected numerical contracts. Failures shall retain their underlying permitted partial states without an additional rollback guarantee. Separate sources shall remain unchanged; supported scalar/output and information aliases shall use source values and properties on entry. Borrowed references shall remain live. No extra library initialization shall be required. |
Additive endpoint arithmetic combines outward numerical bounds with joint source attainment and the library carrier's explicit infinity membership. |
|
|
|
|
|
Compare finite rational sums/differences and independent source-attainment truth tables, both receiving directions, raw/checked and supported floating profiles. Include both natural-infinity source positions and all supported inclusion pairs, scalar/info aliases, bounded overflow outcomes, normalized statuses and caller FPU preservation. |
src/Boundary_defs.hh; tests/intervalboundaryarithmeticsspec1.cc; tests/intervalboundaryupdateoracle.hh; tests/intervalboundaryoracle.hh; tests/mixedboundary1.cc. |
|
|
Internal header: Boundary_defs.hh; free functions in Parma_Polyhedra_Library::Boundary_NS. Template forms denote admitted scalar and information profiles. template <typename To, typename To_Info, typename T1, typename Info1, typename T2, typename Info2> Result add_assign(Boundary_Type to_side, To& to, To_Info& to_info, Boundary_Type side1, const T1& first, const Info1& info1, Boundary_Type side2, const T2& second, const Info2& info2); template <typename To, typename To_Info, typename T1, typename Info1, typename T2, typename Info2> Result sub_assign(Boundary_Type to_side, To& to, To_Info& to_info, Boundary_Type side1, const T1& first, const Info1& info1, Boundary_Type side2, const T2& second, const Info2& info2); |
||
|
SW_SPEC
|
2 |
|
|
|
mul_assign shall form an outward selected endpoint candidate with exact value ab for nonzero finite source entry values. Endpoint exclusion shall be required when either selected finite source endpoint is excluded. For a naturally infinite source and a nonzero partner, the receiving side shall match the mathematical product's infinity sign. The output shall be that natural infinity, included exactly when an applicable naturally infinite source includes its infinity. The owning interval's sign-sensitive endpoint selection shall retain 🔗 3. Ordinary interval multiplication. mul_assign_z shall additionally admit zero endpoint values. Supplied first_sign and second_sign shall distinguish the actual entry zero and nonzero source values, including metadata infinity. With two nonzero sources it shall retain the product rule above. With exactly one zero source it shall produce a zero candidate, excluded exactly when the zero source endpoint is excluded. With two zero sources it shall produce zero, excluded exactly when both zero source endpoints are excluded. Thus an attained zero shall remain attainable even when the partner extremum is excluded or unbounded. No inactive infinite payload shall need to be read in a zero branch. set_zero shall assign an outward representation of mathematical zero with the explicit exclusion request; exactly representable zero shall retain that request whenever the receiving profile supports it. The result shall be the normalized numerical assignment result. Nonzero multiplication and zero assignment shall use the receiving side's outward direction and membership-sensitive relation checking. Selected destination properties shall meet the replacement or compatible composition conditions of 🔗 2. Same-side outward boundary conversion and retained properties. Result normalization, retained selected properties, unrelated/opposite-side metadata and cached interval claims shall obey 🔗 1. Normalization of numerical results into boundary properties. Exact representable values and supported membership distinctions shall yield the exact selected cut; other numerical outcomes shall give an outward receiving cut. Active source payloads shall be initialized, valid and canonical where required. Metadata-encoded infinity shall not require evaluation of an inactive payload. Scalar types, numerical kernels, intermediate arithmetic, resource bounds, policy checks, shared-temporary synchronization and caller-owned FPU state shall meet the selected numerical contracts. Failures shall retain their underlying permitted partial states without an additional rollback guarantee. Separate sources shall remain unchanged; supported scalar/output and information aliases shall use source values and properties on entry. Borrowed references shall remain live. No extra library initialization shall be required. |
Product extrema need explicit zero attainment because an attained zero survives multiplication by values whose selected extremum is excluded. |
|
|
|
|
|
Independently multiply all admitted finite sign/zero candidates and check zero-attainment truth tables for both operand orders and source topologies. Include nonzero directed/inexact products, natural infinities and carrier inclusion, checked range crossings, zero assignment, all scalar receiver aliases, unrelated metadata and result truth. |
src/Boundary_defs.hh; tests/intervalboundaryarithmeticsspec1.cc; tests/intervalboundaryupdateoracle.hh; tests/intervalboundaryoracle.hh; tests/mixedboundary1.cc. |
|
|
Internal header: Boundary_defs.hh; free functions in Parma_Polyhedra_Library::Boundary_NS. Template forms denote admitted scalar and information profiles. template <typename To, typename To_Info, typename T1, typename Info1, typename T2, typename Info2> Result mul_assign(Boundary_Type to_side, To& to, To_Info& to_info, Boundary_Type side1, const T1& first, const Info1& info1, Boundary_Type side2, const T2& second, const Info2& info2); template <typename To, typename To_Info, typename T1, typename Info1, typename T2, typename Info2> Result mul_assign_z(Boundary_Type to_side, To& to, To_Info& to_info, Boundary_Type side1, const T1& first, const Info1& info1, int first_sign, Boundary_Type side2, const T2& second, const Info2& info2, int second_sign); template <typename To, typename To_Info> Result set_zero(Boundary_Type to_side, To& to, To_Info& to_info, bool should_shrink); |
||
|
SW_SPEC
|
3 |
|
|
|
div_assign shall form an outward selected endpoint candidate with exact value a ⁄ b for finite nonzero source entry values. Endpoint exclusion shall be required when either selected finite source endpoint is excluded. Numerical division shall use the receiving side's outward direction and membership-sensitive relation checking. The owning interval's divisor-sign selection and defined-quotient semantics shall retain 🔗 4. Ordinary interval division and zero-divisor abstraction. For a naturally infinite numerator and a finite nonzero denominator, the receiving side shall match the quotient's infinity sign. The output shall be that natural infinity with the numerator's infinity membership. For a finite nonzero numerator and a naturally infinite denominator, the output shall be zero, excluded exactly when the denominator excludes its infinity. An indeterminate quotient of two infinite values shall be resolved by the owning interval before selecting this operation. div_assign_z shall additionally admit zero endpoints and supplied zero/nonzero classifications consistent with the source entry values. For a nonzero numerator and zero denominator, it shall supply an open natural-infinity limit on the receiving side selected by the owning interval. For a zero numerator it shall supply a zero candidate. That zero shall be included when the numerator zero is included or the denominator is an included natural infinity; otherwise it shall be excluded. A finite zero denominator shall not itself make an excluded numerator zero attainable. These zero-limit branches shall use boundary assignment and shall not numerically divide by zero or evaluate an inactive infinite payload. With two nonzero sources the helper shall retain the quotient rule above. Selected destination properties shall meet the replacement or compatible composition conditions of 🔗 2. Same-side outward boundary conversion and retained properties. Result normalization, retained selected properties, unrelated/opposite-side metadata and cached interval claims shall obey 🔗 1. Normalization of numerical results into boundary properties. Exact representable values and supported membership distinctions shall yield the exact selected cut; other numerical outcomes shall give an outward receiving cut. Active source payloads shall be initialized, valid and canonical where required. Metadata-encoded infinity shall not require evaluation of an inactive payload. Scalar types, numerical kernels, intermediate arithmetic, resource bounds, policy checks, shared-temporary synchronization and caller-owned FPU state shall meet the selected numerical contracts. Failures shall retain their underlying permitted partial states without an additional rollback guarantee. Separate sources shall remain unchanged; supported scalar/output and information aliases shall use source values and properties on entry. Borrowed references shall remain live. No extra library initialization shall be required. |
Division endpoint selection distinguishes a numerical quotient from an open pole or a zero candidate, allowing interval arithmetic to exclude undefined denominator-zero pairs. |
|
|
|
|
|
Compare finite nonzero rational quotients and independent exclusion rules, both directions and signs, exact/inexact storage, and scalar receiver aliases. Enumerate zero/nonzero classifications and all zero-attainment combinations; verify no scalar division occurs in zero branches. Include numerator/denominator natural infinities, supported membership, checked overflow, normalized results and preserved sources/FPU state. |
src/Boundary_defs.hh; tests/intervalboundaryarithmeticsspec1.cc; tests/intervalboundaryupdateoracle.hh; tests/intervalboundaryoracle.hh; tests/mixedboundary1.cc. |
|
|
Internal header: Boundary_defs.hh; free functions in Parma_Polyhedra_Library::Boundary_NS. Template forms denote admitted scalar and information profiles. template <typename To, typename To_Info, typename T1, typename Info1, typename T2, typename Info2> Result div_assign(Boundary_Type to_side, To& to, To_Info& to_info, Boundary_Type side1, const T1& first, const Info1& info1, Boundary_Type side2, const T2& second, const Info2& info2); template <typename To, typename To_Info, typename T1, typename Info1, typename T2, typename Info2> Result div_assign_z(Boundary_Type to_side, To& to, To_Info& to_info, Boundary_Type side1, const T1& first, const Info1& info1, int first_sign, Boundary_Type side2, const T2& second, const Info2& info2, int second_sign); |
||
|
SW_SPEC
|
4 |
|
|
|
umod_2exp_assign and smod_2exp_assign shall form same-side outward endpoint candidates for the corresponding scalar residue. For a finite entry value a and m = 2e, the nonnegative candidate shall be u = a − m⌊a ⁄ m⌋, so 0 ≤ u < m. For the centered operation, the candidate shall be s = u when u < m ⁄ 2 and s = u − m otherwise, so − m ⁄ 2 ≤ s < m ⁄ 2. Exponent zero shall mean m = 1 (and shall therefore give zero for integral source values). These scalar meanings shall retain 🔗 6. Exact rational operations with powers of two, 🔗 6. Exact centered and nonnegative unbounded integer residues, 🔗 3. Centered and nonnegative native integer dyadic residues, 🔗 3. Exact centered native residue modulo a power of two and 🔗 4. Rounded nonnegative native residue modulo a power of two. The destination and source sides shall match. A finite candidate shall retain source endpoint exclusion, enlarged as needed for numerical outward rounding. Evaluation shall use the receiving side's outward direction and membership-sensitive relation checking. A naturally infinite source shall instead give the same-side natural-infinity boundary with its source membership, supporting the owning interval's unbounded residue fallback. The owning interval shall select the required endpoint cases and account for residue discontinuities under 🔗 2. Interval abstraction of wrapped integer images with refinement. The exponent and every numerical intermediate shall meet the selected scalar operation's admission. A generic template signature shall not promise unavailable source/destination residue specializations. Selected destination properties shall meet the replacement or compatible composition conditions of 🔗 2. Same-side outward boundary conversion and retained properties. Result normalization, retained selected properties, unrelated/opposite-side metadata and cached interval claims shall obey 🔗 1. Normalization of numerical results into boundary properties. Exact representable values and supported membership distinctions shall yield the exact selected cut; other numerical outcomes shall give an outward receiving cut. Active source payloads shall be initialized, valid and canonical where required. Metadata-encoded infinity shall not require evaluation of an inactive payload. Scalar types, numerical kernels, intermediate arithmetic, resource bounds, policy checks, shared-temporary synchronization and caller-owned FPU state shall meet the selected numerical contracts. Failures shall retain their underlying permitted partial states without an additional rollback guarantee. Separate sources shall remain unchanged; supported scalar/output and information aliases shall use source values and properties on entry. Borrowed references shall remain live. No extra library initialization shall be required. |
Residue endpoint candidates retain scalar modular semantics and source exclusion while allowing interval wrapping to handle discontinuities and unbounded extents. |
|
|
|
|
|
Use independent exact rational quotient/remainder arithmetic for finite positive/negative grid values, period boundaries and both half-period ties. Check admitted exponent-zero forms, both receiving sides, exact/inexact storage, source topology, natural infinities, scalar aliases, normalized relation truth and preserved metadata/FPU state. |
src/Boundary_defs.hh; tests/intervalboundaryarithmeticsspec1.cc; tests/intervalboundaryupdateoracle.hh; tests/intervalboundaryoracle.hh; tests/mixedboundary1.cc. |
|
|
Internal header: Boundary_defs.hh; free functions in Parma_Polyhedra_Library::Boundary_NS. Template forms denote admitted scalar and information profiles. template <typename To, typename To_Info, typename T, typename Info> Result umod_2exp_assign(Boundary_Type to_side, To& to, To_Info& to_info, Boundary_Type from_side, const T& from, const Info& info, unsigned int exponent); template <typename To, typename To_Info, typename T, typename Info> Result smod_2exp_assign(Boundary_Type to_side, To& to, To_Info& to_info, Boundary_Type from_side, const T& from, const Info& info, unsigned int exponent); |