[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Real numbers..




In article <40318@sophia.inria.fr>, brad@cs.adelaide.edu.au (Bradley Alexander) writes:

|> Is there a standard method of passing real numbers from metal into
|> typol and are there any built in prolog functions able to accept 
|> real numbers as arguments?
|>  ...
|> Are there any constructs availible to cater for real numbers?

MU-Prolog does not implement real numbers, so the distributed version
of Typol does not.

We are working on a new implementation using Sepia. As Sepia do have
real numbers, it should be possible to get them in Typol.

However there is a tricky way of manipulating real numbers if you want it.
Not very efficient, but possible. You have to implement them "as STRING"
in your metal specification, then write some prolog predicates calling
a lisp function that will coerce strings to reals, compute and coerce the
result back into a string. (The same is possible writing a predicate in C,
but you will have to modify the MU-Prolog interpretor).

Thierry

-- 
Send contributions and compliments to centaur@sophia.inria.fr. Registration
and administrative matters should be sent to centaur-request@sophia.inria.fr.
+---------------------------------------------------------------------------+
|     Thierry Despeyroux      | email: Thierry.Despeyroux@sophia.inria.fr   |
| I.N.R.I.A. Sophia-Antipolis | phone: +33 93 65 77 07 fax: +33 93 65 77 66 |
+---------------------------------------------------------------------------+