------- Comment #6 from dennis dot wassel at googlemail dot com  2009-06-01 
12:14 -------
(In reply to comment #3)

> My understanding of infinity in the complex plane is what is called (I
> call?)  "directed inifinity": if abs((a,b)) goes to +Inf and atan2(a,b) has
> a defined value in this limit, then (a,b) goes to infinity in the direction
> given by atan2(a,b).  However (+/-Inf,+/-Inf) defines only four directions
> and is unable to represent general "directed inifinity".  So I think that
> from a "mathematical" point of view the problem is ill-posed,
> (+/-Inf,+/-Inf) is in the same class of "undefined" values as 0/0 or
> Inf/Inf, and should give NaNs.

Then this is the gist of the matter - my FA textbook does not require the
argument to converge, but just the modulus, so our understandings of infinity
differ.
I agree with Dominique in that mathematically (+/-Inf,+/-Inf) is not
well-defined, because the limit of a/b is unknown.

> Now atan2(a,b) is DEFINED such that atan2(+0,+/-0)=+/-0,
> atan2(-0,+/-0)=+/-Pi, atan2(+Inf,+/-Inf)=+/-Pi/4,
> atan2(-Inf,+/-Inf)=+/-3*Pi/4 (it seems that it is even built in the Intel
> hardware).  With this definition of atan2, it is possible to give a
> definition of (+/-Inf,+/-Inf) as the directions of the corners of the
> "infinite square".  I have nothing against this defintion, except it should
> be documented.

The mathematicians among us will writhe in agony, but I think this serves the
purpose best :)

> [...]
> In this case the results at compile and run times should be the
> same ("least surprising approach").

I strongly support that point, because everything else would be a very nasty
gotcha for an average Fortran user like myself.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40318

Reply via email to