This site is a static rendering of the Trac instance that was used by R7RS-WG1 for its work on R7RS-small (PDF), which was ratified in 2013. For more information, see Home.
Source for wiki NumericTower version 19
author
cowan
comment
ipnr
98.14.173.81
name
NumericTower
readonly
0
text
== The numeric tower ==
This is an analysis of the R5RS provision that the full numeric tower may be subsetted. Four boolean feature settings characterize different kinds of numeric towers: `exactness-preserving`, `ratios`, `inexact`, and `complex`. These refer respectively to the closure of exact numbers under rational operations (except `/`), exact non-integer values, inexact rationals, and non-real numbers.
There are therefore 16 possible numeric towers. Nine of them are known to have implementations, as shown below. I write `+` if a feature is present and `-` if it is absent, and give a general description of the resulting tower and some Scheme implementations that provide it.
||`exactness-preserving`||`ratios`||`inexact`||`complex`||Description||Implementations
||-||-||-||-||A "toy" tower with bounded exact integers only (possibly appropriate where no numerical work will be done)||!SigScheme*||
||-||-||+||-||Fixnums and flonums (all arithmetic runsin essentially constant time)||Plain Chicken, Shoe*, !TinyScheme*, RScheme, BDC*, XLisp*, Schemik*, VX, SXM*, Inlab, Sixx, Sizzle (also Elisp*, C*)||
||-||-||+||+||Fixnums, flonums, and inexact complex numbers (all arithmetic runs in essentially constant time)||Stalin||
||-||+||+||+||Limited-range exact and inexact numbers||Scheme 7, Wraith||
||+||-||+||-||Exact integers and inexact real numbers (a good all-round compromise)||Bigloo, Scheme 9, Elk (also ISLisp)||
||+||-||+||+||Exact integers, inexact real numbers, and inexact complex numbers||SCM||
||+||+||-||-||Exact rational numbers only (reasonable for some purposes, but will often run very slowly without inexact support, so unsuitable for scientific-type work)||Dream, Oaklisp, Owl Lisp||
||+||+||+||-||Real numbers only||Psyche, Ikarus, Rep, Elk (also Clojure)||
||+||+||+||+||Full numeric tower||Racket, Gauche, MIT, Gambit, Chicken with the `numbers` egg, Scheme48/scsh, Kawa, SISC, Chibi, Guile, Chez, Vicare, Larceny, Ypsilon, Mosh, !IronScheme, STklos, KSi, UMB, Spark (also Common Lisp, Pure)||
*These systems are technically exactness-preserving but don't return the right answers when their arithmetic operations overflow.
See NumericTowerManisComments for Vincent Manis's comments on an earlier version of this page.
See also ComplexRepresentations for information on which Schemes support exact, inexact, and mixed-exactness complex numbers.
time
2012-05-06 22:07:59
version
19