🤖 AI Summary
This work addresses the challenge of nearest-integer rounding in integer-based clock skew compensation by proposing two non-incremental integer algorithms: Multiplication-Decomposed Integer Division (MDID) and Addition-Decomposed Direct Search (ADDS). Both methods operate within a unified mathematical framework that eliminates floating-point arithmetic, thereby avoiding associated precision loss and overflow risks. MDID achieves O(1) time complexity for small divisors but may suffer from overflow, whereas ADDS is overflow-free and applicable to arbitrary parameters at the cost of increasing computational complexity with larger inputs. Theoretical analysis reveals that 32-bit ADDS matches the accuracy of 64-bit double-precision floating-point compensation, and its 64-bit implementation attains the fidelity of 128-bit quadruple-precision methods, elucidating a fundamental equivalence and trade-off between integer-based and high-precision floating-point approaches in terms of error bounds and space complexity.
📝 Abstract
We formulate the problem of clock skew compensation as a special case of the integer linear scaling in the form of iD/A and propose two algorithms -- i.e., the multiplicative decomposition of integer division (MDID) and the additive decomposition of direct search (ADDS) -- for its nearest integer solution, which are not only immune to floating-point precision loss but also non-incremental unlike our prior approaches based on Bresenham's algorithm. Having theoretically established both decomposition algorithms based on a unified and rigorous formulation of the problem of the integer linear scaling rounded to the nearest integer, we discuss the space-time trade-off through the analysis of their computational complexities and non-overflow conditions. Through the numerical examples in a practical context of clock skew compensation under two different scenarios based on 32-bit and 64-bit integers, we observe that MDID can obtain the nearest integer solutions with the complexity of O(1) when D is much smaller than the maximum value of the underlying integer type but overflows otherwise; in comparison, ADDS can handle all the cases under both scenarios without overflows but at the expense of increased computational complexity when i approaches the maximum value of the underlying integer type. We also observe that ADDS based on 32-bit integers is equivalent to the clock skew compensation based on 64-bit double-precision floating-point arithmetic, while both algorithms based on 64-bit integers are equivalent to the clock skew compensation based on 128-bit quadruple-precision floating-point arithmetic, which highlights another trade-off between the bounded compensation errors and lower space complexity of the integer-based decomposition algorithms and the lower chances of overflows resulting from the wide ranges of numbers of the clock skew compensation based on floating-point arithmetic.