[r6rs-discuss] [Formal] Clarification of chapter 1 overview bits re: exactness and complex numbers

John Cowan cowan at ccil.org
Sat Jan 27 11:10:34 EST 2007

Aubrey Jaffer scripsit:

>  * What purposes do exact non-real complex numbers serve?

Well, I confess that I myself have programmed for thirty years now
without ever needing to go beyond fixnums (except in implementations
where flonums are the only or the most basic kind of number, like Perl
and most Basics).  But I know there are applications for exact bignums
and exact rationals, and did a little googling for <"Gaussian integers"
applications> and found a sufficiency of hits.

What's more, I take seriously the claim of exactness being orthogonal to
the dimension of type (to which you yourself appealed in R5.91RS comment
#40), which says that complex numbers may be exact or inexact.

> To represent exact complexes requires either boxing two potentially
> boxed numbers or a flury of new combination types:

[list snipped]

Obviously such a list is insane.

> In the double-boxing scenario when one component is a ratnum, a number
> can be triple-boxed!  Wading through so many levels of boxing will
> perform tepidly at best.

People who need exactness should not complain of inefficiency; that is
precisely the intended tradeoff, or there would be no need for inexact
numbers at all.

> With inexact complex numbers, even interpreted R5RS implementations
> can provide good platforms for physics, optics, and electronics
> calculations and simulations.  What "killer apps" become possible with
> exact complex numbers?

Again, I don't really know, but I note that Q and Haskell support them,
as does Mathematica (which is, from what I understand, not given to
supporting things that people have no use for).

John Cowan       http://www.ccil.org/~cowan        <cowan at ccil.org>
        You tollerday donsk?  N.  You tolkatiff scowegian?  Nn.
        You spigotty anglease?  Nnn.  You phonio saxo?  Nnnn.
                Clear all so!  `Tis a Jute.... (Finnegans Wake 16.5)

More information about the r6rs-discuss mailing list