
Re: asin2?
Posted:
Aug 17, 2000 9:59 PM


In <VmhjrA54942.22424916082000@news.frii.com> Virgil <Vmhjr@frii.com> writes:
>In article <xrGm5.1082$9N1.18474@vixen.cso.uiuc.edu>, >prussing@aae.uiuc.edu (John Prussing) wrote:
>> Apparently I have (surprisingly) confused everyone with the notation. >> x and y were intended to be dummy arguments, not cartesian components >> of some point.
>Since you r example did not make clear that your dummy arguments should >not be coordinates, I am surprised that you were surprised.
And I am surprised that you were surprised that I was surprised. Are we in an infinite loop here?
I assumed that readers of this newsgroup knew what the function atan2(*,*) was.
>In your example, at least one of your dummy variables had to allow both >positive and negative values to get the standard arcsine function. This >certainly suggested that one of the dummy variables could be a >coordinate, since for ordinary triangles there are no negatives needed.
> If either of the "dummy arguments" may be negative, why not both of >them?
>And if both of them may take either positive or negative values, there >is enough information available to construct an asin2 valid over all 4 >quadrants, since the two signs are enough to determine the quadrant >uniquely and correctly.
Let me try to explain it again. And I'll try to respond to your (different) email message also.
tan(t) = sin(t)/cos(t) = u/v and t = atan2(u,v). sin(t) and cos(t) can independently be > 0 or < 0, There are two independent pieces of information here: the value of sin(t) and cos(t). 2^2 = 4 possible values of atan2 are available, covering all four quadrants.
On the other hand, what about sin(t) or cos(t)? As a ratio sin(t) = sin(t)/sqrt(sin^2(t) + cos^2(t)). There is only one piece of independent information here, namely sin(t). The denominator is > 0 by definition (it is r in the xy plane).
Any asin function cannot tell the difference between quadrants QI and QII or between QIII and QIV. That is my contention, that an asin2 analogous to atan2 does not exist. I said long back, that one is stuck with the principal value of the ordinary asin being in QI or QIV.
In your (different) email message (why didn't you post it here?) you ask whether, given tan(t) = 1/1 can atan2 tell the difference between t = pi/4 and t = 5*pi/4? I note that this is a question about atan2 and not the (mythical) asin2. The answer is no. But that does contribute anything to our discussion. atan2 assumes that sin(t) > 0 and cos(t) > 0 and returns t = pi/4, i.e., QI.
Next you ask that if you are given the standard form u/v, how do you find the signs of u and v? You simply examine the numerical values of u and v. If u = 1 the sign of u is < 0, etc.
You next note that: If you _cannot_ determine the signs of u and v separately, then atan2 is just as impossible as asin2.
As I've said for atan2 u = sin(t) and v = cos(t), so their signs can be determined separately.
You next state that if you can determine the separate signs of u and v, asin2 is just as possible as atan2. That statement is correct, but as I have said, one cannot determine the sign of v for asin2 because v > 0.
Next, you address my test problem sin(t) = 1/sqrt(2). You state that IF u > 0 and v > 0 then t = pi/4. But, in fact, u = 1 > 0 and v = sqrt(2) > 0, so THE answer is pi/4, as you say. But the sad fact is that 3*pi/4 has the same u and v. Hence the impossibility of asin2.
You then state that if u < 0 and v < 0 then t = 3*pi/4. This is, unfortunately, incorrect for two reasons: (1) u is not < 0 nor is v < 0, and (2) the value of t in this case would be in QIII, not QII.
Next, you propose sin(t) = 1/sqrt(2). You state that if u < 0 and v > 0 (which is correct) then t =  pi/2. This is probably a typo and you meant  pi/4. i.e., in QIV.
You then consider u > 0 (not true) and v < 0 (not true and impossible, as I've stated), and come up with a typoed result based in false premises. A negative argument for any asin function will return the principal value in QIV. In simple terms, sin(t) = y/r, with r > 0 (the distance from the origin in the fabled xy plane).
Because v > 0, If u > 0 the value of t is in Q1, and if u < 0 the value is in QIV (principal value). There's no way on God's Green Earth that an asin function, given sin(t) = u/v, where u and v are general variables, can reurn a value in QII or QIII.
So, to summarize, an asin function, because it has only one independent piece of information, cannot do better than the principal value. But atan2(u,v) has two independent pieces of information and can therefore determine a unique quadrant.
Virgil, if you respond, please stick with a single posted message.  ========================= John E. Prussing Dept. of Aeronautical & Astronautical Engineering University of Illinois at UrbanaChampaign http://www.uiuc.edu/~prussing =========================

