OM Floats

David Carlisle davidc at nag.co.uk
Wed Jul 7 17:05:07 CEST 1999


> Actually, if there are an infinite number of 9's,
ah, but that's unlikely, isn't it:-)

> My guess is, however, that double-precision is more easily treated
> as a special case of arbitrary precision, plus inf and nan.

Perhaps, but if floats are anyway being encoded via an OM Symbol
then you could do this as well. The OMF primitive type would then not be
used by those systems.


me> OpenMath does not have a
me>primitive notion of rationals,

> REally?
yes

>  Seems like a loss.

OM just has primitive types for:
integer
double precision float
string    (unicode string)
bytearray (arbitrary sequence of bytes)
symbols   (defined in content dictionaries)
variables (just have a name)

and then builds trees with these as the leaves and using 
apply (usually) or attribution, error, and binding, as constructors.

Rationals are built by applying a rational-constructor symbol to two
integers.

That is the design. As in any design there are things that _could_ be
different but the current aim is to firm up the text of the standard
not to have a completely different design.

So the question is whether there is a usage for arbitrary precision
floats that is sufficiently `canonical' that it could be added to that
small list of primitive types, or whether there will always be
sufficient variation in the way in which you want to construct these
things that it makes more sense to have a CD containing such
constructors and then to build floats by applying these symbols,
as is currently done for the rationals.

David



More information about the Om mailing list