OM Floats

Richard J. Fateman fateman at cs.berkeley.edu
Wed Jul 7 16:50:21 CEST 1999


>From davidc at nag.co.uk Wed Jul  7 01:22 PDT 1999


>(Davidc)... the core CDs do contain symbols that
>represent NaN and various notions of infinite number.

I don't know what these might be, but I should point out
that rational-number style versions of + infinity and - infinity
can be written as +1/0 and -1/0.  NaN can be written as 0/0 if
you only have one. You also have lots of other notations you
could use like 2/0, though GCDs may convert that to 1/0.

I wrote a paper on this about 10 years ago, and how nicely it works for
interval arithmetic.  It has been submitted to ISSAC 94 and with minor
revisions, to ISSAC 97. And rejected as having nothing to do with
computer algebra and also inefficient to boot.


>(David) There are some systems that need _exact_ reals, rather than reals to
>some specifiable precision.

I can't believe there is no way to specify exact rationals in OM. As for
exact reals, such as the non-rational exp(exp(1)), there is no way
of representing them generally except by a computation.  I don't know how
OM can specify them in a number system as a string.

>If I asked a theorem proving system whether

>> 2.0
>was equal to
>> 1.99999999999999999999999999999999999999999999999999

>I would be shocked if it said true no matter how many 9s were there.

Actually, if there are an infinite number of 9's, then the numbers
are, by a fairly reasonably judgment, the same.


>In fact as this thread is showing there are many different possible
>requirements for `floating point numbers' which is why I think that
>using a mechanism of constructing them from a constructor symbol in a CD
>gives much more flexibility,

(yes)

 and the current OMF should be kept as
>currently specified, solely for double precision values.
(no educated opinion here...  I don't know exactly what's specified.
My guess is, however, that double-precision is more easily treated
as a special case of arbitrary precision, plus inf and nan.
The efficiency of encoding is a total red herring unless you
are transmitting in binary from machine to machine, not
<like> <\this>
)


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

REally?  Seems like a loss.




More information about the Om mailing list