[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
implementation categories, exact rationals
| Most implementations of Scheme fall into one of the following
| * fixnums only (now rare except in toy implementations)
| * fixnums and flonums only
| * exact rationals and flonums only (no imaginary numbers)
| * the complete numeric tower
SCM, Guile, and SCM-Mac (and one presumes Galapagos and WinSCM) have
fixnums, bignums, and real and complex flonums. SCM and its
derivatives have a large installed base. In particular, Guile is part
of every Fedora GNU/Linux installation. This category should be
included in your list.
| This SRFI proposes to revise section 6.2 ("Numbers") of R5RS by:
| * requiring a Scheme implementation to provide the full tower,
| including exact rationals of arbitrary precision, exact
| rectangular complex numbers with rational real and imaginary
| parts, and inexact real and complex arithmetic
What is the rationale for mandating exact rationals? Over 15 years I
have written numerical Scheme code for everything from symbolic
algebra to Galois fields to linear systems to optics simulations
without needing exact rationals.
A case could be made if (expt -26. 1/3) returned -2.9624960684073702;
but I know of no Scheme implementation that does so.