Cleaning up the tower: Numbers in Scheme

Sebastian Egner · 2004

The R 5 RS specification of numerical operations leads to unportable and intransparent behavior of programs. Specifically, the notion of “exact/inexact numbers ” and the misleading distinction between “real ” and “rational ” numbers are two primary sources of confusion. Consequently, the way R 5 RS organizes numbers is significantly less useful than it could be. Based on this diagnosis, we propose to abandon the concept of exact/inexact numbers from Scheme altogether. In this paper, we examine designs in which exact and inexact rounding operations are explicitly separated, while there is no distinction between exact and inexact numbers. Through examining alternatives and practical ramifications, we arrive at an alternative proposal for the design of the numerical operations in Scheme. 1

Read the paper · More papers on PaperTik