[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Complex infinities
Date: Fri, 6 Feb 87 19:47:04 PST
From: edsel!bhopal!jonl@navajo.stanford.edu (Jon L White)
...Now, the significant question is what to do about complex infinities.
I have some current needs for the two rational infinities -- one of
which is to model floating-point exactly -- but I don't have any ideas
at all about the complex domain. Do you?
Proposal: For complex floating infinities, use z/0 such that |z| = 1.
For complex rational infinities, let z have relatively prime integer
parts. The format for reading and printing such infinities is #I(r)
for real infinities r/0, and #I(r i) for the complex infinities
#C(r i)/0. As with rationals, convert to canonical form on input. The
name of the function to reconstruct z from z/0 should probably be
called something like RATIONAL-SIGNUM. This function (which is useful
even without infinities) coincides with SIGNUM except for rational
complex arguments, where it returns a complex number with relatively
prime integer parts and the same phase as its argument.
I am tempted to propose #I(0) as some pseudo-arithmetical object (NAN?)
that can be created but not operated on, or which becomes
arithmetically contagious under user control. Maybe someone who uses
NAN's can tell me whether this is the right way to do them.
Date: Wed, 4 Feb 87 09:27 EST
From: Robert A. Cassels <Cassels@STONY-BROOK.SCRC.Symbolics.COM>
...Note that it depends on what sort of calculation you're doing whether
infinity is an appropriate answer or not. One of the reasons that
rational infinities aren't in Common Lisp yet is that there is some
debate about whether rational infinity is affine (signed) or projective
(unsigned).
I hadn't heard the debate, but I know the answer: ``it depends on what
sort of calculation you're doing.'' But you can do projective
arithmetic on an affine system (coerce to positive infinity with ABS or
some to-be-proposed automagic), whereas there's no way to do affine
arithmetic on a projective system. I find this argument more
compelling than IEEE compatibility for having the system support the
affine case. (Cases like cot(0) where there is no unique affine answer
can return the principal affine answer--which turns out to be the
projective answer!)
With complex numbers there are at least three possible answers (based
on the compactification of the plane into a disc (affine), a projective
plane (projective, but now there are many infinities), or a sphere
(where there is only one infinity)). The affine model I propose above
is the most general, and it can be coerced to the one-infinity model
with ABS. You can coerce to the projective model with
(defun PROJ(z)
(if (or (minusp (imagpart z))
(and (zerop (imagpart z))
(minusp (realpart z))))
(- z)
z))
for IMAGPART, REALPART, ZEROP, and MINUSP suitably extended to the
infinities.
Dan