Betr.: [clean-list] IEEE floating point and Clean

M.Kesseler@aia.nl M.Kesseler@aia.nl
Wed, 12 Sep 2001 10:04:14 +0200


>But Kahan is playing close to his chest and I cannot really figure
>out what he means when he writes that Java has no possibility to
>handle exceptions.

The exceptions that Kahan talks about are not Java-exeptions, but
error conditions like overflow, underflow etc. One way to deal with
this (according to IEEE 754) is to use a special floating-point
value for representing these conditions, AND to use specific rules for
subsequent operations on them.

These rules however are sometimes problematic. See page 23:
"(finite/Overflow) becomes 0 , (NaN < 7) becomes false , ... Perhaps
no traces will be left to arouse suspicions that plausible final
results are actually quite wrong."

So, some computations with exceptional values yield ordinary results.
This can be dangerous. Java provides no built-in way to check that
such a situation has occured. Clean does not either (as far as I know).
If you see 'INF' in your program, that is just a representation of
an exceptional value.

regards,
Marco Kesseler

----------------------------------------------------------------------
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.
----------------------------------------------------------------------