> On Wed, 20 Jul 2005 16:15:20 +0200
> "Goffioul Michael" <goffioul@...> wrote:
> > > On Wed, 2005-07-20 at 13:32 +0200, Goffioul Michael wrote:
> > > > Do you think that extending ECL to support inifinity and=20
> > > NaN as special
> > > > numbers is possible (without too much effort)? I know this=20
> > > is not part
> > > > of ANSI, but it can be very convenient.
> > >=20
> > > The effort is precisely on ensuring that it does not=20
> > > contradict the ANSI
> > > semantics. Do you know how this is handled, say for instance,=20
> > > in CMUCL?
> > It uses special constants defined in the EXT package. See=20
> for example
> > But as you say, the problem is to not contradict ANSI.=20
> 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?
When you do engeering computation. For example, to convert a cubic
representation (a1, a3) of an amplifier into the more common parameters
(Gain, IIP3): for a linear amplifier, a3=3D0, hence IIP3 is infinite.
It's then handy to have 1/0=3DInf to avoid special cases in your =
In the same way, 1/Inf=3D0 is also handy.