Complex bakeoff - example 2
Jim Thomas
uunet!taligent.com!jim_thomas
Fri Oct 6 18:21:38 PDT 1995
Complex bakeoff - example 2 10/6/95 4:44 PM
Those darn infinities. The first bakeoff example illustrated a need for
complex infinities to satisfy certain properties such as finite / zero =
infinite and finite / infinite = zero .
Subsequent comments have pointed out that the Riemann sphere model of complex
numbers, which has just one infinity, is adequate for the example presented
and in fact for the important class of analytic functions, each independent of
the direction its argument approaches infinity. Harry Cheng's paper,
"Handling of Complex Numbers in the C^H Programming Language"
(X3J11.1/93-020), presents an extension of C for complex arithmetic which has
just one infinity.
Other functions however are dependent on the direction their argument
approaches infinity. Computed
exp(x + y * I)
might well be expected to show an approach to 0 as x approaches -infinity with
y fixed, and an approach to infinity (which infinity depends on y) as x
approaches +infinity with y fixed.
Here's a simple example illustrating use of multiple complex infinities. ez
evaluates the exponential function at a point on a given parametrized path at
a given parameter value. For CCE, the straightforward implementation
double_complex ez(double_complex (*z)(double), double t)
{
return exp(z(t));
}
meets the expectations mentioned above (along horizontal paths), even if the
real part of z overflows. How would an equivalent function be coded for a
system with just one (or no) infinity?
In general, a complex function might be expected to behave like its real
function counterpart for arguments restricted to their common (real) domain.
Thus, for example, the complex and real exponential functions both should
yield 0 at -infinity on the real axis.
Another example could be devised for
erf(z)
which approaches 1 as z approaches infinity along the positive real axis, and
erf approaches infinity as z approaches infinity along the positive imaginary
axis.
I don't mean to be over selling. The meager number of complex infinities
available from the Cartesian representation doesn't nearly support all one
might wish to do with transcendental functions. But they are useful in some
significant cases.
-Jim
More information about the Numeric-interest
mailing list