[PATCH]: Integrate gfortran with MPC

Dennis Wassel dennis.wassel@googlemail.com
Mon Jun 1 08:21:00 GMT 2009


2009/5/31 Dominique Dhumieres <dominiq@lps.ens.fr>:

> Any better ideas?

This might be somewhat closer to what the functional analysis guys
would expect (sorry if I'm lecturing):
Complex numbers have a well-defined concept of infinity, which I like
to visualise as the "infinite-diameter" ring around the finite complex
numbers, so its argument is, of course, not well-defined. This is
conceptually somewhat different from the two points +/-Inf on the real
line, and it is not signed.
Thus, I would humbly suggest to identify every number a+bi, where |a|
or |b| (or both!) are Inf with complex infinity (and likewise for NaN.
Cases like Inf + iNaN surely want to be NaN as well).
This definition of an "infinite side length" square is consistent with
my textbook's one (any takers?)
Using this definition, analogue rules as for real numbers hold for complex ones:
- z/(Complex Inf) = 0+0i, as long as z /= (Complex Inf) or (Complex
NaN), and (Complex NaN) otherwise,
- z/(0+0i) = (Complex Inf), as long as z /= 0+0i, (Complex Inf) or
(Complex NaN), and (Complex NaN) otherwise.

To me, this would be the least surprising approach.

Thoughts?

Cheers,
Dennis



More information about the Fortran mailing list