[Ecls-list] Extension to infinity and NaN?
Julian Stecklina
der_julian at web.de
Wed Jul 20 07:51:21 UTC 2005
On Wed, 20 Jul 2005 16:15:20 +0200
"Goffioul Michael" <goffioul at imec.be> wrote:
> > On Wed, 2005-07-20 at 13:32 +0200, Goffioul Michael wrote:
> > > Do you think that extending ECL to support inifinity and
> > NaN as special
> > > numbers is possible (without too much effort)? I know this
> > is not part
> > > of ANSI, but it can be very convenient.
> >
> > The effort is precisely on ensuring that it does not
> > contradict the ANSI
> > semantics. Do you know how this is handled, say for instance,
> > in CMUCL?
>
> It uses special constants defined in the EXT package. See for example
> http://common-lisp.net/project/cmucl/doc/cmu-user/extensions.html#toc7.
> But as you say, the problem is to not contradict ANSI. Thinking about
> it, does ANSI state that (/1 0) MUST signal an error? Looking at
> HyperSpec, it uses MIGHT. From CMUCL doc, it seems that this depends
> on some trapping flag.
Having (/ 1 0) signal no error violates the POLA for quite some users,
and is mathematically incorrect (infinity is no number). When does it
come handy?
My two (euro) cents,
--
Julian Stecklina
LISP has survived for 21 years because it is an approximate local
optimum in the space of programming languages. - John McCarthy (1980)
More information about the ecl-devel
mailing list