[Ecls-list] [PATCH] Improve floating-point exception handling.
Juan Jose Garcia-Ripoll
juanjose.garciaripoll at googlemail.com
Tue Jun 2 07:34:48 UTC 2009
On Mon, Jun 1, 2009 at 6:21 PM, Gabriel Dos Reis
<gdr at integrable-solutions.net> wrote:
> As a user, I would like to know what impact this change would have
> for ECL-based OpenAxiom. OpenAxiom is quite happy that it does
> not have to go through whoops to get NaNs or infinities as
> directly provided by the hosting system.
AFAIK, CommonLisp mandates that all floating points are valid numbers.
NaNs and infinities are not contemplated. So far, ECL has not
supported them. There is no way to print them or read them, and the
fact that in some architectures they have been generated (due to not
trapping the appropriate exceptions), has been accidental. Even
without these patches, on my Mac OS X, division by zero produces
exceptions.
Now, I understand that for some purposes it might be desirable to have
no-numbers and infinities. However, one should then ponder how to do
this in the least disruptive way, and as an optional feature.
Juanjo
bash-3.2$ ecl -norc
ECL (Embeddable Common-Lisp) 9.5.1
Copyright (C) 1984 Taiichi Yuasa and Masami Hagiya
Copyright (C) 1993 Giuseppe Attardi
Copyright (C) 2000 Juan J. Garcia-Ripoll
ECL is free software, and you are welcome to redistribute it
under certain conditions; see file 'Copyright' for details.
Type :h for Help. Top level.
> (/ 0.0 0.0)
#<a DIVISION-BY-ZERO>
Broken at SI:BYTECODES.No restarts available.
Broken at SI:BYTECODES.
>> :q
Top level.
> (/ 1.0 0.0)
#<a DIVISION-BY-ZERO>
Broken at SI:BYTECODES.No restarts available.
Broken at SI:BYTECODES.
>> :q
Top level.
--
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
http://juanjose.garciaripoll.googlepages.com
More information about the ecl-devel
mailing list