OM Floats

Richard J. Fateman fateman at
Wed Jul 14 22:31:35 CEST 1999

Again this may be unwelcome/ coming from a non-"paid-up" correspondent,
but the reason I thought rationals should be in the standard is only
based on my estimation of how much has already been included. 

In fact, one can make the argument that anything that can be built
up from other primitives should be left out.  That is the dominant
philosophy behind the Scheme dialect of Lisp. The advantage that
Scheme has over OM  (as far as I can tell wrt OM) is that Scheme
is a programming system with very powerful abstraction mechanisms
(e.g. lists, functions, environments).

One can make the argument on the other side that anything that is
likely to be built by several people, but in gratuitously different
and incompatible ways, should be included in the language in the
interests of re-usability, etc.  That is the dominant philosophy
in the Common Lisp dialect of Lisp.  

In lisp one can construct rational numbers in many ways. Here are
three:  a dotted pair:  (numerator . denominator).
        a tagged list   (RATIONAL  numerator denominator)
        an (implicitly tagged) structure; a vector... #s(RATIONAL numerator denominator).

There are choices as to whether the GCD should be factored out, and
how the numerator and denominator are represented.  Common Lisp
makes all these choices, and also decides the default printing
and reading form for these items.

If OM is small like Scheme (warning, the official IEEE standard for
Scheme is something like 15 pages), then feel free to leave stuff out.

If OM is like Common Lisp, 1000+ pages? then it seems to me to be
rather surprising that OM's concept of number primitives goes only
to integer  (and apparently IEEE double-float too), and not much else.

Regarding Complex All you need, in effect, is a special indeterminate "i"
such that i^2+1=0.  Putting that in without rationals seems like
a fairly arbitrary design choice.


More information about the Om mailing list