[clean-list] IEEE floating point and Clean

Marco Kesseler M.Kesseler@aia.nl
Wed, 12 Sep 2001 14:27:49 +0200


> As I understand Kahan now. He wants that a computation doesn't interrupt
> but the user should get the possibility to set a flag do work off the
> place where the infinity/over/underflow... occured.
> 
> An obtuse question: Why isn't this possible with Clean or are there any
> well planed reasons to implement Clean as it is now? It is likely that
> the Clean guys were aware of exception-handling.

Yes, I know they were, but exceptions (a la Java) in a pure, lazy 
functional language is not an easy thing to implement, to put it 
mildly.

It IS possible to create your own floating point numbers in Clean, 
an attach flags to them. Various operations on these numbers 
should then test their results for 'INF' and the like, and set the 
flags. Users of these numbers can then check whether something 
went wrong in the computation of some result.

Kahan however would like support for this in the language itself, 
because this could avoid performce problems (which are usually 
important in computations that involve floating points).
 
> Clean team, please do not get depressed, I still like Clean. But I think
> some themes are not discussed or unspoken and this could make confusion.
> You may not forget, there are a hundred of "silent" readers who maybe
> get a wrong impression.

In this respect, Clean is certainly not worse than most of the 
'commercial' languages.

regards,
Marco

----------------------------------------------------------------------
Aia                                     Phone: +31 24 371 02 30
PO Box 38025                            Fax:   +31 24 371 02 31
6503 AA Nijmegen                        Email: M.Kesseler@aia.nl
The Netherlands                         URL:   http://www.aia.nl
----------------------------------------------------------------------
This E-mail and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are adressed. If you have received this E-mail in error please notify
the postmaster (postmaster@aia.nl). The authenticity of this
message cannot, at this moment, be guaranteed by ourselves. For this
reason no legal rights may be granted should the contents differ to
the original sent message. The Aia log-file of sent messages is 
deemed to be the sole, true transcript of communication unless the 
contrary, other than the received message, can be proven.
----------------------------------------------------------------------