Functions to Support Input and Output of Intervals
M. H. van Emden, B. Moa, S. C. Somosan
TL;DR
The paper tackles the challenge of reliable input and output for interval arithmetic under directed rounding. It develops first-principles algorithms for decimal input and output, enabling the computation of the narrowest floating-point interval containing a given decimal numeral and the decimal numeral equal to a floating-point number, respectively. Core techniques include binarization and normalization for input, Knuth-style radix conversion to binary, and fltoem/decimalize/decOut for output, with careful handling to produce intervals that contain the target value or are contained within the input when appropriate. The work yields portable, language- and machine-independent building blocks that improve the correctness and practicality of interval I/O, balancing accuracy with efficiency where possible.
Abstract
Interval arithmetic is hardly feasible without directed rounding as provided, for example, by the IEEE floating-point standard. Equally essential for interval methods is directed rounding for conversion between the external decimal and internal binary numerals. This is not provided by the standard I/O libraries. Conversion algorithms exist that guarantee identity upon conversion followed by its inverse. Although it may be possible to adapt these algorithms for use in decimal interval I/O, we argue that outward rounding in radix conversion is computationally a simpler problem than guaranteeing identity. Hence it is preferable to develop decimal interval I/O ab initio, which is what we do in this paper.
