Talk:Atan2: Difference between revisions
m Maintain {{WPBS}} and vital articles: 1 WikiProject template. Create {{WPBS}}. Keep majority rating "C" in {{WPBS}}. Remove 1 same rating as {{WPBS}} in {{Maths rating}}. Remove 1 deprecated parameter: field. |
|||
(47 intermediate revisions by 13 users not shown) | |||
Line 1: | Line 1: | ||
{{WikiProject banner shell|class=C|1= |
|||
{{maths rating|class=C|importance=mid|field=geometry}} |
|||
{{WikiProject Mathematics|importance=mid}} |
|||
}} |
|||
==Order of arguments== |
==Order of arguments== |
||
This article isn't very clear about the order of the two arguments x and y in the atan2() function call. Many people will incorrectly assume at first glance that it is atan2(x,y) -- the text should be more explicit (I missed the order in the "more specifically" text the first 3 times I read it). I maintain a parser for an expression language where atan2(a,b) returns atan(b/a) rather than C's atan(a/b)... |
This article isn't very clear about the order of the two arguments x and y in the atan2() function call. Many people will incorrectly assume at first glance that it is atan2(x,y) -- the text should be more explicit (I missed the order in the "more specifically" text the first 3 times I read it). I maintain a parser for an expression language where atan2(a,b) returns atan(b/a) rather than C's atan(a/b)... |
||
Line 6: | Line 7: | ||
The C-language atan2 is convenient to apply by remembering that tangent = opposite/adjacent. Since angle = atan2(opposite,adjacent), it's easy to remember. [[User:Hollimb|Hollimb]] 18:43, 25 March 2007 (UTC) |
The C-language atan2 is convenient to apply by remembering that tangent = opposite/adjacent. Since angle = atan2(opposite,adjacent), it's easy to remember. [[User:Hollimb|Hollimb]] 18:43, 25 March 2007 (UTC) |
||
: I think it is '''not unnecessary''' to add a sentence to emphasize that the order of the arguments is (y, x), not (x, y). I remember when I first saw this function in Fortran documents, I took it as atan2(x, y) until I found my results did not make sense. Many people are inclined to make this mistake. --[[User:Roland Longbow|Roland]] ([[User talk:Roland Longbow|talk]]) 19:58, 31 October 2019 (UTC) |
|||
:: Of course, it is important to use the arguments as they are defined in the manual.<br />But the “natural” (usual, normal, predefined etc.) order of the coordinates is (x,y) and not (y,x). Nobody will say z = y i + x. It is a standard convention that the x-axis comes first, increases to the right (is defined to be identical to the '''polar axis''') and the y-axis (coming second) runs up. So it was kind of an '''error''' by the FORTRAN-people to define {{nowrap|atan2(y,x)}} the way they did. Maybe they thought of {{nowrap|1=atan(y/x) =: atan2(y,x)}} (for 0<x,y) (simply replacing the slash by the comma and appending the letter “2”) and were unable to think of {{nowrap|1=arctan2(x,y) = atan(x<sup>-1</sup> y).}}<br />This mistake is — in my opinion — the cause of the kind of errors mentioned by [[User:Roland Longbow|Roland]] above. --[[User:Nomen4Omen|Nomen4Omen]] ([[User talk:Nomen4Omen|talk]]) 09:35, 1 November 2019 (UTC) |
|||
== The first note under "Definition" == |
== The first note under "Definition" == |
||
Line 37: | Line 41: | ||
* <math>y < 0 \implies \arctan(\frac y x)\neq 0 \implies atan2(y,x)>-pi</math> |
* <math>y < 0 \implies \arctan(\frac y x)\neq 0 \implies atan2(y,x)>-pi</math> |
||
* <math>y > 0 \implies atan2(y,x)>0</math> |
* <math>y > 0 \implies atan2(y,x)>0</math> |
||
* <math>y = 0 \ |
* <math>y = 0 \land x>0 \implies atan2(y,x)=0 </math> |
||
* <math>y = 0 \ |
* <math>y = 0 \land x<0 \implies atan2(y,x)=pi </math> |
||
* <math>y = 0 \ |
* <math>y = 0 \land x=0 \implies \implies atan2(y,x) undefined </math> |
||
Therefore atan2's codomain is <math>(-\pi,\pi]</math>, NOT <math>[-\pi,\pi]</math>. |
Therefore atan2's codomain is <math>(-\pi,\pi]</math>, NOT <math>[-\pi,\pi]</math>. |
||
Line 87: | Line 91: | ||
Is there maybe a more convoluted formula that doesn't require any conditions, but is also computationally stable and isn't often undefined when y=0 (or at least the latter) ? I think this would merit inclusion into the article. --[[User:Skytopia|Skytopia]] ([[User talk:Skytopia|talk]]) 22:32, 5 September 2010 (UTC) |
Is there maybe a more convoluted formula that doesn't require any conditions, but is also computationally stable and isn't often undefined when y=0 (or at least the latter) ? I think this would merit inclusion into the article. --[[User:Skytopia|Skytopia]] ([[User talk:Skytopia|talk]]) 22:32, 5 September 2010 (UTC) |
||
:I'm not sure if this formula satisfies your request, but I found the equation: |
|||
:atan2(y,x) = -i ln((x + i y)/sqrt(x^2 + y^2)) |
|||
:to be useful. I got it from Wolfram Alpha. [[User:AnotherNeko|AnotherNeko]] ([[User talk:AnotherNeko|talk]]) 10:52, 1 December 2022 (UTC) |
|||
:: This is kind of a punt, as then you need to start with a definition of the complex logarithm, which is even more complicated to explain. For the purpose of concrete computation, the complex logarithm is often implemented in code in terms of real atan2 and real natural log. –[[user:jacobolus|jacobolus]] [[User_talk:jacobolus|(t)]] 19:00, 1 December 2022 (UTC) |
|||
::: What about the following: |
|||
:::<math>\operatorname{atan2}(y,x) \quad = \quad \arctan\left(\tfrac{y}{x}\right)\sgn(x)^2 +\tfrac{1-\sgn(x)}2\left(- \sgn(y)^2+\sgn(y)+ 1\right)\pi </math> |
|||
:::for <math>(x,y) \in \R^2 \setminus \{(0,0)\}</math> |
|||
:::–[[User:Nomen4Omen|Nomen4Omen]] ([[User talk:Nomen4Omen|talk]]) 20:20, 1 December 2022 (UTC) |
|||
== Derivative == |
== Derivative == |
||
Line 152: | Line 167: | ||
[[Special:Contributions/50.47.104.180|50.47.104.180]] ([[User talk:50.47.104.180|talk]]) 18:20, 10 July 2018 (UTC) |
[[Special:Contributions/50.47.104.180|50.47.104.180]] ([[User talk:50.47.104.180|talk]]) 18:20, 10 July 2018 (UTC) |
||
:I apologize for my precipitous edit summary, in which, for missing the important subtlety ({{sfrac|x|y}}), I wrongly called two alternatives of your edit "blatantly wrong". I would have edited this, if it were possible. In an effort to remediate this at least a bit I wrote "looking closer" in my next summary. |
|||
:In my penultimate edit I tried to justify the epitethon "compact" of your variant by |
|||
:*removing the first alternative since it is included in |
|||
:*the second and third, compacted to the new first. |
|||
:*I did the necessary expansion of the "±" of the originally third, ambiguous alternative, and |
|||
:*tried to give a line of thought to explain how to get to this variant, which I perceived as not immediately obvious. |
|||
:*BTW, because of discontinuity the {{math|atan2}} cannot be fully described by referring to just 2 half planes. |
|||
:*I see my last edit as superior to to the now current version. |
|||
:<small><small>I consider the heading of this thread as caused by my flawed summary, but nevertheless, in the light of my edits here, as offensive.</small></small> [[User:Purgy Purgatorio|Purgy]] ([[User talk:Purgy Purgatorio|talk]]) 07:10, 11 July 2018 (UTC) |
|||
:: It was "[my] edit" that restored this expression that appears to have been on this page for some number of years and is also on the [[Argument (complex analysis)]] page. The reason this compact expression is useful is because each case is valid for a continuous half plane. There is only one condition to apply, not two, to determine which case you use. In [[digital signal processing]], we make use of the <math>\arg(\cdot)</math> quite often to get phase response for an [[Linear time-invariant theory|LTI filter]], or for the [[instantaneous phase]] of an [[analytic signal]]. In the case of [[group delay]] for the former or for [[instantaneous frequency]] for the latter, we end up differentiating phase with respect to angular frequency (former) or time (latter). This differentiation requires ''phase unwrapping'' to deal with discontinuities. But in both cases we know that there will not be negative group delay (which means the derivative is negative) nor negative instantaneous frequency (which means the derivative is positive). In both those cases, the appropriate half-plane is exactly what is needed, eliminating the need to deal with an ''ostensible'' discontinuity. The compact expression is more useful and more informative as it is. |
|||
:: You're sorta new around here (apparently 2014) but not so new that it appears you get into a few scrapes with other editors. My only advise is: ''Don't think that every edit you do makes the article better.'' Personally, I think the section on ''Definition and computation'' was better and cleaner before you changed it. Especially that <math>\operatorname{\hat Arg}(\cdot)</math>. It's now wordy, far less concise, and just ickier since July 1 for people who want to get to the facts quickly. The article is important. More important to non-mathematicians because they (the non-mathematicians) need guidance about how to deal with the 4 quadrant argument, but they don't need to worry about an obscure range of {{nowrap|for {{closed-open|0, 2{{pi}}}}}} and alternative definitions with alternative symbols. It just makes it obtuse. Your first edit of July 1 was okay, but I think you took more liberty with the article than was good for it. Despite [[wp:BOLD]]. It was cleaner and clearer before. [[Special:Contributions/50.47.104.180|50.47.104.180]] ([[User talk:50.47.104.180|talk]]) 09:13, 11 July 2018 (UTC) |
|||
:::{{Ping|50.47.104.180}} Maybe you should not forget to mention that this version of '''atan2''' differs from the first one in the half-plane ''x''<0. --[[User:Nomen4Omen|Nomen4Omen]] ([[User talk:Nomen4Omen|talk]]) 13:20, 11 July 2018 (UTC) |
|||
:::: No, it does not '''differ'''. It ''is'' ambiguous because of the "±" to an additive term of 2π. But the symbol "±" does not force the reader to choose either particular option. [[Special:Contributions/50.47.104.180|50.47.104.180]] ([[User talk:50.47.104.180|talk]]) 19:45, 11 July 2018 (UTC) |
|||
:::::If it's ambiguous, then it's ''NOT'' a function. Whereas the first '''atan2''' is, as well as '''Arctan''' etc. If you let the reader to choose either particular option, you need not say anything. --[[User:Nomen4Omen|Nomen4Omen]] ([[User talk:Nomen4Omen|talk]]) 20:11, 11 July 2018 (UTC) |
|||
:::::: That's right. Because there are alternative choices with the overlapping half-planes, it's not a function. But it's '''still''' an ''expression''. Say we're in quadrant I. We can use either the Case x>0 or Case y>0. Which one is not explicitly determined in this expression. The purpose of this expression was apparently to offer flexibility it choice, not to strictly define a function. [[Special:Contributions/50.47.104.180|50.47.104.180]] ([[User talk:50.47.104.180|talk]]) 23:58, 11 July 2018 (UTC) |
|||
{{od}}I stop in this offensive thread with batting around ''membership, scrapes, bragging'' on elementary DSP-terms, whether WP is primarily for ''quick and dirty'' access, and other off topics. [[User:Purgy Purgatorio|Purgy]] ([[User talk:Purgy Purgatorio|talk]]) 07:45, 13 July 2018 (UTC) |
|||
== Defining {{math|atan2}} via {{math|Arg}} == |
|||
Since there are mainly two different principal branches in the {{math|arg}}-codomain in mathematical use (see also [[Argument (complex analysis)|Argument]]), I mentioned both in defining the {{math|atan2}} function via these different branches, distinguishing them for notational consistency by writing {{math|Arg}} and {{math|Ârg}}, respectively, trying to be as terse as possible with this clerical detail. However, I think it is of encyclopedic value not to brush over this, saving a few (~ 5) lines. |
|||
Since there are reservations to mentioning both standards –this making the article ''obtuse''–, I ask for further ideas. [[User:Purgy Purgatorio|Purgy]] ([[User talk:Purgy Purgatorio|talk]]) 07:48, 13 July 2018 (UTC) |
|||
== Defining {{math|atan2}} via {{math|arctan}} == |
|||
In this case there is no ambiguity wrt the codomain {{open-open|{{sfrac|-{{pi}}|2}},{{sfrac|{{pi}}|2}}}} of the standard principle branch Arctan, but there are subtleties wrt the quotient argument {{math|({{sfrac|''y''|''x''}})}} of the {{math|atan2}}, and its inherent discontinuity in its domain, when changing between the three necessary branches of {{math|arctan}}. |
|||
Additionally, defining {{math|atan2}} via {{math|arctan}} allows for employing clever alternatives: |
|||
*The use of "{{math|cot({{sfrac|''x''|''y''}})}}" (watch out the inversion) introduces an [http://mathworld.wolfram.com/InverseCotangent.html {{math|Arccot}} with codomain {{open-open|{{sfrac|-{{pi}}|2}},{{sfrac|{{pi}}|2}}}}] and a discontinuity at {{math|0}}. Shifting this up and down by {{sfrac|{{pi}}|2}}, according to the sign of {{mvar|y}}, yields the desired three branches of {{math|atan2}} as negative {{math|arctan}}-branches, leaving just to separately take care of {{math|''y'' {{=}} 0.}} |
|||
*The use of a half angle property. The inherent factor {{math|2}} in this identity allows to exhaust the open part of the full codomain {{open-closed|-{{pi}},{{pi}}}} of {{math|atan2}}, by doubling the result of the {{math|Arctan}} within {{open-open|{{sfrac|-{{pi}}|2}},{{sfrac|{{pi}}|2}}}}, leaving just the margin {{pi}} for an extra alternative in the definition. Massaging the argument expression yields a minor variant. |
|||
While the second variant seems to go uncommented, the first variant is replaced by an incorrect composition of the immediate {{math|Arctan}}-access and this variant. The argumentation that this replacement were ''compact'' is evidently wrong, its usefulness is unsourced, and the claim that wrong definitions would not matter in practical applications is obviously a flawed argument. Putting forward that the discontinuity of the {{math|atan2}} function were ''ostensible'' is also flawed in itself. |
|||
This is my suggestion for this definition, where already the first alternative covers almost the whole {{math|X/Y}}-plane, and the single exception {{math|''y'' {{=}} 0}} is dealt with in the remaining three. |
|||
:<math>\operatorname{atan2}(y,x) = |
|||
\begin{cases} |
|||
- \operatorname{Arctan}\left(\frac{x}{y}\right) + \sgn(y)\cdot\frac{\pi}{2} \quad &\text{if } y \ne 0, \\ |
|||
0 &\text{if } y = 0 \text{ and } x > 0, \\ |
|||
\pi &\text{if } y = 0 \text{ and } x < 0, \\ |
|||
\text{undefined} &\text{if } y = 0 \text{ and } x = 0. |
|||
\end{cases}</math> |
|||
Please, comment. [[User:Purgy Purgatorio|Purgy]] ([[User talk:Purgy Purgatorio|talk]]) 10:21, 13 July 2018 (UTC) |
|||
: There are a few things to comment about. First, it is not me bringing into this any axe-grinding. Just being firm about what is technically correct and technically useful. |
|||
: The reason for a strict functional definition (over an ambiguous, but correct, expression) is in case someone is going to implement this in a computer program. Otherwise, for mathematical purposes, the ambiguous expression is correct and more useful because of its ambiguous flexibility. Just choose whichever half-plane best serves your needs. That was the reason for the two DSP illustrations, of which purpose seemed to be missed. It's just an example, but it's a real-world example that illustrates the usefulness of the ambiguous expression. |
|||
: If this were to be used as a definition for implementation, remember that the common series for <math>\arctan(u)</math> is good for <math>|u| \le 1</math>. Then, '''as a function''', this is better: |
|||
:: <math>\operatorname{atan2}(y,x) = |
|||
\begin{cases} |
|||
\text{undefined} &\text{if } x = 0 \text{ and } y = 0 \\ |
|||
\operatorname{Arctan}\left(\frac{y}{x}\right) &\text{if } x > |y|, \\ |
|||
\frac{\pi}{2} - \operatorname{Arctan}\left(\frac{x}{y}\right) &\text{if } y \ge |x|, \\ |
|||
-\frac{\pi}{2} - \operatorname{Arctan}\left(\frac{x}{y}\right) &\text{if } y \le -|x|, \\ |
|||
\operatorname{Arctan}\left(\frac{y}{x}\right) + \pi &\text{if } x < -y \text{ and } y \ge 0, \\ |
|||
\operatorname{Arctan}\left(\frac{y}{x}\right) - \pi &\text{if } x < y \text{ and } y < 0, \\ |
|||
\end{cases}</math> |
|||
: With the argument to <math>\arctan(u)</math> known to have magnitude no larger than 1, a straight-forward series (with no additional tests for case) can be implemented for it. [[Special:Contributions/50.47.108.245|50.47.108.245]] ([[User talk:50.47.108.245|talk]]) 00:04, 18 July 2018 (UTC) |
|||
::It is obvious that there are arbitrarily many variants to calculate appropriate values for a certain notion, like here {{math|atan2(''y'',''x''),}} especially, since there are already arbitrarily many ways to give a well defined meaning to this notion. Besides the doubt that ''series'' are a widely applied algorithm to calculate concrete values, the prime task in this chapter is to give a clean meaning to the notion in a most accessible way. Besides the, perhaps unsatisfactory, simple renaming to {{math|Arg(''x'',''y'')}}, the article offers a straightforward definition, justifying the naming, via the unhandy {{math|Arctan({{sfrac|''y''|''x''}}),}} which necessarily needs an exception for {{math|''x'' {{=}} 0}} '''and''' for the discontinuity of the {{math|atan2}} along {{math|''y'' {{=}} 0}} and {{math|''x'' < 0.}} The arguably complex look of this definition is the price for its straightforwardness. |
|||
::The next two variants in my suggestion exploit, respectively, the shift between the {{math|tan}} and {{math|cot}}, introducing the expression {{math|Arctan({{sfrac|''x''|''y''}})}} (note the inverted argument!), and a trigonometric half-angle identity. Both variants give a maximally compact definition of the {{math|atan2}} at the expense of being less obvious. |
|||
::The immediately above suggestion may or may not be a variant, that is especially apt for calculation, preferred in specific applications, or that has non-obvious merits for calling it '''better''', but it certainly does not prevail in readability. Discussing it in detail: |
|||
:#The first line, excluding {{math|(0,0),}} is necessary in all variants. |
|||
:#The second line contains the same expression as the immediate {{math|Arctan}}-definition, restricted to a region for dubious advantages in calculation. |
|||
:#The third and the fourth line contain expressions identical to the single expression in my suggestion, again with restricted regions for an assumed background in calculation. |
|||
:#The fifth and the sixth line also apply given expressions, and are necessary to complement the given regions to the full domain of {{math|atan2.}} |
|||
::Summing it up, the most recent suggestion offers no new conceptual access to the {{math|atan2}}-function. It is neither immediately acessible, nor in any way compact, but is only justified by assumed advantages in calculating {{math|Arctan}}-values in a specific manner, that may lack any application in real computation. [[User:Purgy Purgatorio|Purgy]] ([[User talk:Purgy Purgatorio|talk]]) 09:32, 22 July 2018 (UTC) |
|||
::: Purgy, don't think for a minute that the changes you have made, make the article better or more readable. There is no consensus to those changes. The functional definition mentioned above is not meant for "publication" but to make a point about what a '''function''', that is numerically well-behaved and useful for implementation, might look like. But it's not meant for the mainspace. |
|||
::: But the expression (function) you keep changing this to is truly useless in every sense of the word: |
|||
:::: <math>\operatorname{atan2}(y,x) = |
|||
\begin{cases} |
|||
- \operatorname{Arctan}(\frac{x}{y}) + \sgn(y)\cdot\frac{\pi}{2} \quad &\text{if } y \ne 0,\quad &(\to (-\pi,0) \cup (0,\pi)) \\ |
|||
0 &\text{if } y = 0 \text{ and } x > 0, \quad &(\to \{0\})\\ |
|||
\pi &\text{if } y = 0 \text{ and } x < 0, \quad &(\to \{\pi\}) \\ |
|||
\text{undefined} &\text{if } y = 0 \text{ and } x = 0. |
|||
\end{cases}</math> |
|||
::: No one will ever use that definition either for mathematical reference (which is what the first definition of the restored version is) nor for implementation. And you have no cited references for that. When the angle is close to zero and the sign of the angle undetermined, no one should be using <math>- \operatorname{Arctan}(\frac{x}{y}) + \sgn(y)\cdot\frac{\pi}{2} </math>. It's a lousy expression with an ostensible discontinuity that is unnecessary and no practical nor elegant attribute. [[Special:Contributions/50.47.108.245|50.47.108.245]] ([[User talk:50.47.108.245|talk]]) 18:59, 23 July 2018 (UTC) |
|||
::::IP50.47.108.245, {{tq|don't think for a minute that the changes you have made, make the article better or more readable. There is no consensus to those changes.}} |
|||
::::Please, let's have had enough of this language, and let's start some arguing about improvements. In my last edit I tried to respect your interest in numerical aspects by adding an identity to satisfy bounds, considered to be important for calculation, even when I doubt that they are. I am not focused on this aspect of the topic, and would appreciate you adding relevant information on this. I do however try to keep the conceptual math part separate from the numerical math. I think being explicit about the formal background is relevant in an encyclopedia, even when the numerical info is comparatively terse as of now. |
|||
::::I appreciate any improvement of my efforts to put the conceptual "definitions" of {{math|atan2}} on a solid base to a more readable, but also consistent form. I pointed out already above where the reinstated version lacks reasoning and that it contains partially poor mathematics. This is the target I am aiming my details at, btw, at an expense of ~700 chars. |
|||
::::Furthermore, please, start to accept that all the unmotivatedly grouped lines (as far as they are correct) in the definitions of the current version are (as explained already) identical to, and fully covered by the fewer lines in well sorted variants of my suggestion, and that an '''inherent''' jump-discontinuity along a full ray in the {{math|X/Y}}-plane is within math concepts not just an ''ostensible'' one. WP is (tries to be) an encyclopedia, not a cookbook. [[User:Purgy Purgatorio|Purgy]] ([[User talk:Purgy Purgatorio|talk]]) 05:36, 25 July 2018 (UTC) |
|||
::::: Purgy, ''"mak[ing] the article better or more readable"'' and ''"consensus"'' regarding ''"changes"'' is the language of wikipedia. |
|||
::::: The convention of atan2() returning values in the range [0, 2π) is so rare and obscure that I cannot find a single use of it. Elevating this alternate convention from footnote does not improve the article. |
|||
::::: The definition as originally presented is still the most straightforward initial definition of the function: |
|||
::::::<math>\operatorname{atan2}(y,x) = |
|||
\begin{cases} |
|||
\arctan(\frac y x) &\text{if } x > 0, \\ |
|||
\arctan(\frac y x) + \pi &\text{if } x < 0 \text{ and } y \ge 0, \\ |
|||
\arctan(\frac y x) - \pi &\text{if } x < 0 \text{ and } y < 0, \\ |
|||
+\frac{\pi}{2} &\text{if } x = 0 \text{ and } y > 0, \\ |
|||
-\frac{\pi}{2} &\text{if } x = 0 \text{ and } y < 0, \\ |
|||
\text{undefined} &\text{if } x = 0 \text{ and } y = 0. |
|||
\end{cases}</math> |
|||
::::: The lede paragraph that also defines the function (but without an explicit function of ''x'' and ''y'') in terms of [[Polar coordinate system]] and the complex [[Argument (complex analysis)|arg()]] needs some good work. And, historically, even though there was a reference to [[Fortran IV]], the first documented appearance of atan2() is [[Fortran 77]]. [[Special:Contributions/50.47.108.245|50.47.108.245]] ([[User talk:50.47.108.245|talk]]) 18:40, 26 July 2018 (UTC) |
|||
::::::Would you please mind to note that |
|||
::::::* to my knowledge I never wrote about a {{tq| convention of atan2() returning values <s>(from)(?)</s> in the range [0, 2π)}} <small>necessary modification due to intransparent edit of above comment 06:49, 27 July 2018 (UTC)</small>, and that |
|||
::::::* I do not object to the immediately above given atan2-definition, and finally, that |
|||
::::::* I cannot perceive any adherence from your side to the language of WP, which you seem to claim I would not cling to. |
|||
::::::I am interested in improving this article, but not in getting rebuffed with wrong claims and and inappropriate admonishing. I wait for some constructive reply to the thread I started above with [[#Defining atan2 via Arg]]. [[User:Purgy Purgatorio|Purgy]] ([[User talk:Purgy Purgatorio|talk]]) 21:07, 26 July 2018 (UTC) |
|||
::::::: Purgy, now you've been explicit that you're a hypocrite. (All this defensiveness about "language".) The onus is on you to expose one item of ''"mathematical rubbish"''. [[Special:Contributions/50.47.108.245|50.47.108.245]] ([[User talk:50.47.108.245|talk]]) 18:19, 30 July 2018 (UTC) |
|||
{{od}} |
|||
For the time being I am tired of any further attempts to come to a reasonable consensus on any improvement of this article. Ongoing personal offenses, mathematically inane conceptions, and absolute lack of any readiness for cooperation are to blame. Read it to your liking. [[User:Purgy Purgatorio|Purgy]] ([[User talk:Purgy Purgatorio|talk]]) 13:04, 31 July 2018 (UTC) |
|||
== Reverse the order of arguments and negate the arguments == |
|||
While the order of arguments can be reversed by mistake, it can be reversed intentionally to achieve a different purpose. In engineering problems, especially in the area of solar energy application, the solar azimuth angle, which can be computed from the x- and y-component of the vector pointing to the Sun using the '''atan2''' function, normally measures from due North (positive y-axis) or due South (negative y-axis), this can be achieved by using '''atan2(x, y)''' or '''atan2(-x, -y)'''. Notice the order of x and y and negative signs. In both of these cases, clockwise angles are positive. Maybe this can be added in a new section. --[[User:Roland Longbow|Roland]] ([[User talk:Roland Longbow|talk]]) 22:22, 31 October 2019 (UTC) |
|||
== Derivative across Heaviside step function boundary == |
|||
I disagree the statement "this derivative is continuously defined except at the origin,". My belief is that coordinate derivative across Heaviside step function boundary should include Dirac delta function term. <!-- Template:Unsigned --><small class="autosigned">— Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[User:Textdirected|Textdirected]] ([[User talk:Textdirected#top|talk]] • [[Special:Contributions/Textdirected|contribs]]) 02:05, 1 November 2020 (UTC)</small> <!--Autosigned by SineBot--> |
|||
:The derivatives |
|||
::<math> |
|||
\begin{align} |
|||
& \frac{\partial}{\partial x}\operatorname{atan2}(y,\, x) = \frac{\partial}{\partial x} \arctan\left(\frac y x \right) = -\frac{y}{x^2 + y^2}, \\[5pt] |
|||
& \frac{\partial}{\partial y}\operatorname{atan2}(y,\, x) = \frac{\partial}{\partial y} \arctan\left(\frac y x \right) = \frac x {x^2 + y^2}. |
|||
\end{align} |
|||
</math> |
|||
:are 100 % correct. They are defined in <math>\R^2\setminus \{0,0\}</math> and continuous there. The same is, of course, true for the total differential. |
|||
:You are kind of right wrt the principal value of <math>\rm{atan2}</math>, which is kind of an [[artifact]] − similar to the [[Heaviside step function]]. The latter has derivative 0 almost everywhere. Where not you may employ some [[Dirac delta function]] term of height exactly 1. For the derivatives of <math>\rm{atan2}</math> the height of the Dirac delta function term is exactly 0. Weird? Isn't it weird? |
|||
:In summary, the phenomenon resembles more the [[complex logarithm]] than the Heaviside step function. −[[User:Nomen4Omen|Nomen4Omen]] ([[User talk:Nomen4Omen|talk]]) 13:36, 1 November 2020 (UTC) |
|||
== Truly bad article == |
|||
The article is extremely confusing, because it makes assertions about the relation between atan2(y,x) and arctan(y/x) without defining which conventions it is assuming for arctan. (At least not until much later in the article.) |
|||
If the article is to make sense, then it must be clear on this point. |
|||
'''Also''': The atan2(y,x) function as implemented in computer systems is not multivalued. So this article should make that unambiguously clear. One of the illustrations shows it to be multivalued, and this is wrong.[[Special:Contributions/2601:200:C000:1A0:492D:B65:DB52:4EFE|2601:200:C000:1A0:492D:B65:DB52:4EFE]] ([[User talk:2601:200:C000:1A0:492D:B65:DB52:4EFE|talk]]) 20:46, 23 May 2021 (UTC) |
|||
: This criticism is overall bit vague and hard to turn into specific changes/improvements. The relation graphed in the figure, <math>\bigl(y/x, \operatorname{atan2}(y, x)\bigr),</math> is "multivalued" in the domain (first coordinate). The axes are clearly labeled, this figure doesn't seem like a problem to me. It’s hard to graph a function of 2 inputs in a 2-dimensional picture. –[[user:jacobolus|jacobolus]] [[User_talk:jacobolus|(t)]] 22:42, 22 October 2022 (UTC) |
|||
: I took a couple swings at cleaning up the first 2 sections, making them more concise and hopefully a bit more comprehensible. Does that help at all? –[[user:jacobolus|jacobolus]] [[User_talk:jacobolus|(t)]] 07:02, 23 October 2022 (UTC) |
|||
=='''Decomposing a rotation matrix missing'''== |
|||
http://nghiaho.com/?page_id=846 <!-- Template:Unsigned IP --><small class="autosigned">— Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[Special:Contributions/2A02:810A:1840:1ED4:C05C:C067:55B1:DE00|2A02:810A:1840:1ED4:C05C:C067:55B1:DE00]] ([[User talk:2A02:810A:1840:1ED4:C05C:C067:55B1:DE00#top|talk]]) 13:35, 22 October 2022 (UTC)</small> <!--Autosigned by SineBot--> |
|||
: If you think this is an important application of atan2, feel free to add it (if others disagree, they can start a discussion explaining why). I don’t think it’s quite fair to say that any particular application of a general purpose tool is "missing" with the implication that it is essential to discuss. –[[user:jacobolus|jacobolus]] [[User_talk:jacobolus|(t)]] 22:45, 22 October 2022 (UTC) |
Latest revision as of 23:18, 14 January 2024
This article is rated C-class on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | |||||||||||
|
Order of arguments
[edit]This article isn't very clear about the order of the two arguments x and y in the atan2() function call. Many people will incorrectly assume at first glance that it is atan2(x,y) -- the text should be more explicit (I missed the order in the "more specifically" text the first 3 times I read it). I maintain a parser for an expression language where atan2(a,b) returns atan(b/a) rather than C's atan(a/b)...
- Fixed. ~a (user • talk • contribs) 00:22, 31 March 2007 (UTC)
The C-language atan2 is convenient to apply by remembering that tangent = opposite/adjacent. Since angle = atan2(opposite,adjacent), it's easy to remember. Hollimb 18:43, 25 March 2007 (UTC)
- I think it is not unnecessary to add a sentence to emphasize that the order of the arguments is (y, x), not (x, y). I remember when I first saw this function in Fortran documents, I took it as atan2(x, y) until I found my results did not make sense. Many people are inclined to make this mistake. --Roland (talk) 19:58, 31 October 2019 (UTC)
- Of course, it is important to use the arguments as they are defined in the manual.
But the “natural” (usual, normal, predefined etc.) order of the coordinates is (x,y) and not (y,x). Nobody will say z = y i + x. It is a standard convention that the x-axis comes first, increases to the right (is defined to be identical to the polar axis) and the y-axis (coming second) runs up. So it was kind of an error by the FORTRAN-people to define atan2(y,x) the way they did. Maybe they thought of atan(y/x) =: atan2(y,x) (for 0<x,y) (simply replacing the slash by the comma and appending the letter “2”) and were unable to think of arctan2(x,y) = atan(x-1 y).
This mistake is — in my opinion — the cause of the kind of errors mentioned by Roland above. --Nomen4Omen (talk) 09:35, 1 November 2019 (UTC)
- Of course, it is important to use the arguments as they are defined in the manual.
The first note under "Definition"
[edit]The first note under the section "Definition" read to the effect that adding 2π to a result in the range (-π,π] resulted in the range (0,2π], which doesn't seem correct. I've changed it to read that adding π has this effect, and have further clarified the line to reduce potential ambiguity regarding to which value the additional π is added.198.54.202.94 (talk) 17:52, 28 May 2008 (UTC)
- But
Closed/semi-open interval
[edit]It is not the first time I see someone changing for in the first paragraph (Indeed, I think I did so sometime in the past). I think this issue should be discussed here and an invisible comment should be kept in the article, for editor's guidance.
As a mathematical funcion, atan2 is defined as
It couldn't be because:
Therefore atan2's codomain is , NOT . I think the confusion arises from computational implementation and how it deals with signed zero.
Since "zero" is now a limit instead of finite real value, we have
and, particularly
but this is only a limit; mathematical atan2 function does NEVER gives that result. Rjgodoy 19:27, 3 July 2007 (UTC)
atan2 and atan
[edit]In Maxima atan2(x,1)=atan(x)
Adam majewski 21:02, 28 October 2007 (UTC)
broken link
[edit]Hi, I'm not sure where this link shall point out so I may put it here if someone knows how to fix it. There's a broken link in reference [1] where it says:
include the C-style atan2 function. The Linux Programmer's Manual [1] says:
--Felipebm (talk) 19:08, 25 March 2008 (UTC)
Neither I do, but IA-32 Intel® Architecture Software Developer’s Manual. Volume 2A: Instruction Set Reference, A-M, 2004 should include a definition too. We could use it instead of The Linux Programmer's Manual. Rjgodoy (talk) 01:33, 26 March 2008 (UTC)
Graph Incorrect?
[edit]I don't understand why the 3D graph shows a slight curve in the profile visible along the negative x. Shouldn't the graph be a constant value of pi along here? —Preceding unsigned comment added by 198.99.123.63 (talk) 16:37, 10 April 2008 (UTC)
Actually it should be -pi/2. However there is no such a slight curve! After your comment I became very suspicious about the graph and plotted the surface by myself (thus I could verify that the values alongside x axis were correct and constant either -pi/2 or pi/2, but for x=0 y=0 of course). It seems to be a slight curve because of an optical illusion due to the perspective and the slight pendient wrt. y axis. Rjgodoy (talk) 21:35, 10 April 2008 (UTC)
The graph is nice but this graph has no axis labels. I don't suppose it means much to you as you know what the graph is saying but anyone like me who is not 100% sure would appreciate people sticking to the good old rule of labeling each and every axis in every graph ever. —Preceding unsigned comment added by 132.181.15.75 (talk) 22:16, 28 May 2008 (UTC)
The chart showing atan2 is completely wrong. I just plotted it in Excel. —Preceding unsigned comment added by 142.23.221.132 (talk) 01:36, 3 February 2009 (UTC)
- Did you note the statement in the article that Excel has the two arguments reversed? — Carl (CBM · talk) 02:36, 3 February 2009 (UTC)
Sign of output
[edit]The article states that the results are positive for y>0 and negative for y<0, but what about y=0? AFAICT, y<0 either gives 0 or π, so it should read that the results are positive for y>=0 and negative for y<0.--Subversive Sound (talk) 14:57, 9 July 2010 (UTC)
- The full definition is given later on, that's a very general idea of how angles are measured. You'd have people saying 0 isn't positive with the change you say. Dmcq (talk) 15:20, 9 July 2010 (UTC)
More stable/consistent 'non-condition' formula?
[edit]Is there maybe a more convoluted formula that doesn't require any conditions, but is also computationally stable and isn't often undefined when y=0 (or at least the latter) ? I think this would merit inclusion into the article. --Skytopia (talk) 22:32, 5 September 2010 (UTC)
- I'm not sure if this formula satisfies your request, but I found the equation:
- atan2(y,x) = -i ln((x + i y)/sqrt(x^2 + y^2))
- to be useful. I got it from Wolfram Alpha. AnotherNeko (talk) 10:52, 1 December 2022 (UTC)
- This is kind of a punt, as then you need to start with a definition of the complex logarithm, which is even more complicated to explain. For the purpose of concrete computation, the complex logarithm is often implemented in code in terms of real atan2 and real natural log. –jacobolus (t) 19:00, 1 December 2022 (UTC)
- What about the following:
- for
- –Nomen4Omen (talk) 20:20, 1 December 2022 (UTC)
Derivative
[edit]In my opinion the section called "Derivative" uses needless complicated formulation, as if some finds such things interesting. As atan2 is a function of two variables, it suffices to just give both the partial derivatives. Nijdam (talk) 20:14, 12 November 2011 (UTC)
- Yes the derivation is totally unnecessary. Dmcq (talk) 20:59, 12 November 2011 (UTC)
Quality
[edit]I first noticed this article existed in 2007 and didn't find it noteworthy but still pointed traffic it's way, since then it has greatly improved! -- BlindWanderer (talk) 06:54, 28 October 2012 (UTC)
External links modified
[edit]Hello fellow Wikipedians,
I have just modified one external link on Atan2. Please take a moment to review my edit. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit this simple FaQ for additional information. I made the following changes:
- Added
{{dead link}}
tag to https://support.apple.com/kb/PH927 - Added archive https://web.archive.org/web/20150820094929/http://www.info.teradata.com:80/HTMLPubs/DB_TTU_15_00/index.html to http://www.info.teradata.com/HTMLPubs/DB_TTU_15_00/index.html#page/SQL_Reference/B035_1145_015K/Arithmetic.062.225.html
When you have finished reviewing my changes, please set the checked parameter below to true or failed to let others know (documentation at {{Sourcecheck}}
).
This message was posted before February 2018. After February 2018, "External links modified" talk page sections are no longer generated or monitored by InternetArchiveBot. No special action is required regarding these talk page notices, other than regular verification using the archive tool instructions below. Editors have permission to delete these "External links modified" talk page sections if they want to de-clutter talk pages, but see the RfC before doing mass systematic removals. This message is updated dynamically through the template {{source check}}
(last update: 5 June 2024).
- If you have discovered URLs which were erroneously considered dead by the bot, you can report them with this tool.
- If you found an error with any archives or the URLs themselves, you can fix them with this tool.
Cheers.—InternetArchiveBot (Report bug) 12:43, 20 October 2016 (UTC)
section: Definition and computation
[edit]I do not understand the following (at the end of the section):
"Computation gives
- "
- I do not see a computation.
- In the foregoing definition and statements atan2(y,x) delivers a real (scalar). How can it deliver a 2-dim point ? and
- especially this one ?
Can somebody help me ? --Nomen4Omen (talk) 20:24, 26 January 2017 (UTC)
- @Nomen4Omen: Thanks for spotting that. This seems to have gotten lost in translation somewhere. This older version (from almost a year ago) makes significantly more sense. I'm going to see what I can do to fix this. --♫CheChe♫ talk 19:34, 27 January 2017 (UTC)
- Fixed. --♫CheChe♫ talk 19:47, 27 January 2017 (UTC)
Section: Derivative
[edit]Up to my knowledge
is not the divergence, but is the gradient of atan2.
(Nabla is OK.) --Nomen4Omen (talk) 14:46, 30 January 2017 (UTC)
- @Nomen4Omen: Yikes! My mistake. Slip of the tongue there, divergence is a scalar, so it can't be that (though I'm glad the equation says the right thing). --♫CheChe♫ talk 15:24, 30 January 2017 (UTC)
- Ok, that should be fine now. Thanks for the help. --♫CheChe♫ talk 15:29, 30 January 2017 (UTC)
hay Purgy, would you like someone to explain the math to you?
[edit]This useful and compact expression of atan2() is completely correct:
50.47.104.180 (talk) 18:20, 10 July 2018 (UTC)
- I apologize for my precipitous edit summary, in which, for missing the important subtlety (x/y), I wrongly called two alternatives of your edit "blatantly wrong". I would have edited this, if it were possible. In an effort to remediate this at least a bit I wrote "looking closer" in my next summary.
- In my penultimate edit I tried to justify the epitethon "compact" of your variant by
- removing the first alternative since it is included in
- the second and third, compacted to the new first.
- I did the necessary expansion of the "±" of the originally third, ambiguous alternative, and
- tried to give a line of thought to explain how to get to this variant, which I perceived as not immediately obvious.
- BTW, because of discontinuity the atan2 cannot be fully described by referring to just 2 half planes.
- I see my last edit as superior to to the now current version.
- I consider the heading of this thread as caused by my flawed summary, but nevertheless, in the light of my edits here, as offensive. Purgy (talk) 07:10, 11 July 2018 (UTC)
- It was "[my] edit" that restored this expression that appears to have been on this page for some number of years and is also on the Argument (complex analysis) page. The reason this compact expression is useful is because each case is valid for a continuous half plane. There is only one condition to apply, not two, to determine which case you use. In digital signal processing, we make use of the quite often to get phase response for an LTI filter, or for the instantaneous phase of an analytic signal. In the case of group delay for the former or for instantaneous frequency for the latter, we end up differentiating phase with respect to angular frequency (former) or time (latter). This differentiation requires phase unwrapping to deal with discontinuities. But in both cases we know that there will not be negative group delay (which means the derivative is negative) nor negative instantaneous frequency (which means the derivative is positive). In both those cases, the appropriate half-plane is exactly what is needed, eliminating the need to deal with an ostensible discontinuity. The compact expression is more useful and more informative as it is.
- You're sorta new around here (apparently 2014) but not so new that it appears you get into a few scrapes with other editors. My only advise is: Don't think that every edit you do makes the article better. Personally, I think the section on Definition and computation was better and cleaner before you changed it. Especially that . It's now wordy, far less concise, and just ickier since July 1 for people who want to get to the facts quickly. The article is important. More important to non-mathematicians because they (the non-mathematicians) need guidance about how to deal with the 4 quadrant argument, but they don't need to worry about an obscure range of for [0, 2π) and alternative definitions with alternative symbols. It just makes it obtuse. Your first edit of July 1 was okay, but I think you took more liberty with the article than was good for it. Despite wp:BOLD. It was cleaner and clearer before. 50.47.104.180 (talk) 09:13, 11 July 2018 (UTC)
- @50.47.104.180: Maybe you should not forget to mention that this version of atan2 differs from the first one in the half-plane x<0. --Nomen4Omen (talk) 13:20, 11 July 2018 (UTC)
- No, it does not differ. It is ambiguous because of the "±" to an additive term of 2π. But the symbol "±" does not force the reader to choose either particular option. 50.47.104.180 (talk) 19:45, 11 July 2018 (UTC)
- If it's ambiguous, then it's NOT a function. Whereas the first atan2 is, as well as Arctan etc. If you let the reader to choose either particular option, you need not say anything. --Nomen4Omen (talk) 20:11, 11 July 2018 (UTC)
- That's right. Because there are alternative choices with the overlapping half-planes, it's not a function. But it's still an expression. Say we're in quadrant I. We can use either the Case x>0 or Case y>0. Which one is not explicitly determined in this expression. The purpose of this expression was apparently to offer flexibility it choice, not to strictly define a function. 50.47.104.180 (talk) 23:58, 11 July 2018 (UTC)
- If it's ambiguous, then it's NOT a function. Whereas the first atan2 is, as well as Arctan etc. If you let the reader to choose either particular option, you need not say anything. --Nomen4Omen (talk) 20:11, 11 July 2018 (UTC)
- No, it does not differ. It is ambiguous because of the "±" to an additive term of 2π. But the symbol "±" does not force the reader to choose either particular option. 50.47.104.180 (talk) 19:45, 11 July 2018 (UTC)
- @50.47.104.180: Maybe you should not forget to mention that this version of atan2 differs from the first one in the half-plane x<0. --Nomen4Omen (talk) 13:20, 11 July 2018 (UTC)
I stop in this offensive thread with batting around membership, scrapes, bragging on elementary DSP-terms, whether WP is primarily for quick and dirty access, and other off topics. Purgy (talk) 07:45, 13 July 2018 (UTC)
Defining atan2 via Arg
[edit]Since there are mainly two different principal branches in the arg-codomain in mathematical use (see also Argument), I mentioned both in defining the atan2 function via these different branches, distinguishing them for notational consistency by writing Arg and Ârg, respectively, trying to be as terse as possible with this clerical detail. However, I think it is of encyclopedic value not to brush over this, saving a few (~ 5) lines.
Since there are reservations to mentioning both standards –this making the article obtuse–, I ask for further ideas. Purgy (talk) 07:48, 13 July 2018 (UTC)
Defining atan2 via arctan
[edit]In this case there is no ambiguity wrt the codomain (-π/2,π/2) of the standard principle branch Arctan, but there are subtleties wrt the quotient argument (y/x) of the atan2, and its inherent discontinuity in its domain, when changing between the three necessary branches of arctan.
Additionally, defining atan2 via arctan allows for employing clever alternatives:
- The use of "cot(x/y)" (watch out the inversion) introduces an Arccot with codomain (-π/2,π/2) and a discontinuity at 0. Shifting this up and down by π/2, according to the sign of y, yields the desired three branches of atan2 as negative arctan-branches, leaving just to separately take care of y = 0.
- The use of a half angle property. The inherent factor 2 in this identity allows to exhaust the open part of the full codomain (-π,π] of atan2, by doubling the result of the Arctan within (-π/2,π/2), leaving just the margin π for an extra alternative in the definition. Massaging the argument expression yields a minor variant.
While the second variant seems to go uncommented, the first variant is replaced by an incorrect composition of the immediate Arctan-access and this variant. The argumentation that this replacement were compact is evidently wrong, its usefulness is unsourced, and the claim that wrong definitions would not matter in practical applications is obviously a flawed argument. Putting forward that the discontinuity of the atan2 function were ostensible is also flawed in itself.
This is my suggestion for this definition, where already the first alternative covers almost the whole X/Y-plane, and the single exception y = 0 is dealt with in the remaining three.
Please, comment. Purgy (talk) 10:21, 13 July 2018 (UTC)
- There are a few things to comment about. First, it is not me bringing into this any axe-grinding. Just being firm about what is technically correct and technically useful.
- The reason for a strict functional definition (over an ambiguous, but correct, expression) is in case someone is going to implement this in a computer program. Otherwise, for mathematical purposes, the ambiguous expression is correct and more useful because of its ambiguous flexibility. Just choose whichever half-plane best serves your needs. That was the reason for the two DSP illustrations, of which purpose seemed to be missed. It's just an example, but it's a real-world example that illustrates the usefulness of the ambiguous expression.
- If this were to be used as a definition for implementation, remember that the common series for is good for . Then, as a function, this is better:
- With the argument to known to have magnitude no larger than 1, a straight-forward series (with no additional tests for case) can be implemented for it. 50.47.108.245 (talk) 00:04, 18 July 2018 (UTC)
- It is obvious that there are arbitrarily many variants to calculate appropriate values for a certain notion, like here atan2(y,x), especially, since there are already arbitrarily many ways to give a well defined meaning to this notion. Besides the doubt that series are a widely applied algorithm to calculate concrete values, the prime task in this chapter is to give a clean meaning to the notion in a most accessible way. Besides the, perhaps unsatisfactory, simple renaming to Arg(x,y), the article offers a straightforward definition, justifying the naming, via the unhandy Arctan(y/x), which necessarily needs an exception for x = 0 and for the discontinuity of the atan2 along y = 0 and x < 0. The arguably complex look of this definition is the price for its straightforwardness.
- The next two variants in my suggestion exploit, respectively, the shift between the tan and cot, introducing the expression Arctan(x/y) (note the inverted argument!), and a trigonometric half-angle identity. Both variants give a maximally compact definition of the atan2 at the expense of being less obvious.
- The immediately above suggestion may or may not be a variant, that is especially apt for calculation, preferred in specific applications, or that has non-obvious merits for calling it better, but it certainly does not prevail in readability. Discussing it in detail:
- The first line, excluding (0,0), is necessary in all variants.
- The second line contains the same expression as the immediate Arctan-definition, restricted to a region for dubious advantages in calculation.
- The third and the fourth line contain expressions identical to the single expression in my suggestion, again with restricted regions for an assumed background in calculation.
- The fifth and the sixth line also apply given expressions, and are necessary to complement the given regions to the full domain of atan2.
- Summing it up, the most recent suggestion offers no new conceptual access to the atan2-function. It is neither immediately acessible, nor in any way compact, but is only justified by assumed advantages in calculating Arctan-values in a specific manner, that may lack any application in real computation. Purgy (talk) 09:32, 22 July 2018 (UTC)
- Purgy, don't think for a minute that the changes you have made, make the article better or more readable. There is no consensus to those changes. The functional definition mentioned above is not meant for "publication" but to make a point about what a function, that is numerically well-behaved and useful for implementation, might look like. But it's not meant for the mainspace.
- But the expression (function) you keep changing this to is truly useless in every sense of the word:
- No one will ever use that definition either for mathematical reference (which is what the first definition of the restored version is) nor for implementation. And you have no cited references for that. When the angle is close to zero and the sign of the angle undetermined, no one should be using . It's a lousy expression with an ostensible discontinuity that is unnecessary and no practical nor elegant attribute. 50.47.108.245 (talk) 18:59, 23 July 2018 (UTC)
- IP50.47.108.245,
don't think for a minute that the changes you have made, make the article better or more readable. There is no consensus to those changes.
- IP50.47.108.245,
- Please, let's have had enough of this language, and let's start some arguing about improvements. In my last edit I tried to respect your interest in numerical aspects by adding an identity to satisfy bounds, considered to be important for calculation, even when I doubt that they are. I am not focused on this aspect of the topic, and would appreciate you adding relevant information on this. I do however try to keep the conceptual math part separate from the numerical math. I think being explicit about the formal background is relevant in an encyclopedia, even when the numerical info is comparatively terse as of now.
- I appreciate any improvement of my efforts to put the conceptual "definitions" of atan2 on a solid base to a more readable, but also consistent form. I pointed out already above where the reinstated version lacks reasoning and that it contains partially poor mathematics. This is the target I am aiming my details at, btw, at an expense of ~700 chars.
- Furthermore, please, start to accept that all the unmotivatedly grouped lines (as far as they are correct) in the definitions of the current version are (as explained already) identical to, and fully covered by the fewer lines in well sorted variants of my suggestion, and that an inherent jump-discontinuity along a full ray in the X/Y-plane is within math concepts not just an ostensible one. WP is (tries to be) an encyclopedia, not a cookbook. Purgy (talk) 05:36, 25 July 2018 (UTC)
- Purgy, "mak[ing] the article better or more readable" and "consensus" regarding "changes" is the language of wikipedia.
- The convention of atan2() returning values in the range [0, 2π) is so rare and obscure that I cannot find a single use of it. Elevating this alternate convention from footnote does not improve the article.
- The definition as originally presented is still the most straightforward initial definition of the function:
- The lede paragraph that also defines the function (but without an explicit function of x and y) in terms of Polar coordinate system and the complex arg() needs some good work. And, historically, even though there was a reference to Fortran IV, the first documented appearance of atan2() is Fortran 77. 50.47.108.245 (talk) 18:40, 26 July 2018 (UTC)
- Would you please mind to note that
- to my knowledge I never wrote about a
convention of atan2() returning values
necessary modification due to intransparent edit of above comment 06:49, 27 July 2018 (UTC), and that(from)(?)in the range [0, 2π) - I do not object to the immediately above given atan2-definition, and finally, that
- I cannot perceive any adherence from your side to the language of WP, which you seem to claim I would not cling to.
- to my knowledge I never wrote about a
- I am interested in improving this article, but not in getting rebuffed with wrong claims and and inappropriate admonishing. I wait for some constructive reply to the thread I started above with #Defining atan2 via Arg. Purgy (talk) 21:07, 26 July 2018 (UTC)
- Purgy, now you've been explicit that you're a hypocrite. (All this defensiveness about "language".) The onus is on you to expose one item of "mathematical rubbish". 50.47.108.245 (talk) 18:19, 30 July 2018 (UTC)
- Would you please mind to note that
For the time being I am tired of any further attempts to come to a reasonable consensus on any improvement of this article. Ongoing personal offenses, mathematically inane conceptions, and absolute lack of any readiness for cooperation are to blame. Read it to your liking. Purgy (talk) 13:04, 31 July 2018 (UTC)
Reverse the order of arguments and negate the arguments
[edit]While the order of arguments can be reversed by mistake, it can be reversed intentionally to achieve a different purpose. In engineering problems, especially in the area of solar energy application, the solar azimuth angle, which can be computed from the x- and y-component of the vector pointing to the Sun using the atan2 function, normally measures from due North (positive y-axis) or due South (negative y-axis), this can be achieved by using atan2(x, y) or atan2(-x, -y). Notice the order of x and y and negative signs. In both of these cases, clockwise angles are positive. Maybe this can be added in a new section. --Roland (talk) 22:22, 31 October 2019 (UTC)
Derivative across Heaviside step function boundary
[edit]I disagree the statement "this derivative is continuously defined except at the origin,". My belief is that coordinate derivative across Heaviside step function boundary should include Dirac delta function term. — Preceding unsigned comment added by Textdirected (talk • contribs) 02:05, 1 November 2020 (UTC)
- The derivatives
- are 100 % correct. They are defined in and continuous there. The same is, of course, true for the total differential.
- You are kind of right wrt the principal value of , which is kind of an artifact − similar to the Heaviside step function. The latter has derivative 0 almost everywhere. Where not you may employ some Dirac delta function term of height exactly 1. For the derivatives of the height of the Dirac delta function term is exactly 0. Weird? Isn't it weird?
- In summary, the phenomenon resembles more the complex logarithm than the Heaviside step function. −Nomen4Omen (talk) 13:36, 1 November 2020 (UTC)
Truly bad article
[edit]The article is extremely confusing, because it makes assertions about the relation between atan2(y,x) and arctan(y/x) without defining which conventions it is assuming for arctan. (At least not until much later in the article.)
If the article is to make sense, then it must be clear on this point.
Also: The atan2(y,x) function as implemented in computer systems is not multivalued. So this article should make that unambiguously clear. One of the illustrations shows it to be multivalued, and this is wrong.2601:200:C000:1A0:492D:B65:DB52:4EFE (talk) 20:46, 23 May 2021 (UTC)
- This criticism is overall bit vague and hard to turn into specific changes/improvements. The relation graphed in the figure, is "multivalued" in the domain (first coordinate). The axes are clearly labeled, this figure doesn't seem like a problem to me. It’s hard to graph a function of 2 inputs in a 2-dimensional picture. –jacobolus (t) 22:42, 22 October 2022 (UTC)
- I took a couple swings at cleaning up the first 2 sections, making them more concise and hopefully a bit more comprehensible. Does that help at all? –jacobolus (t) 07:02, 23 October 2022 (UTC)
Decomposing a rotation matrix missing
[edit]http://nghiaho.com/?page_id=846 — Preceding unsigned comment added by 2A02:810A:1840:1ED4:C05C:C067:55B1:DE00 (talk) 13:35, 22 October 2022 (UTC)
- If you think this is an important application of atan2, feel free to add it (if others disagree, they can start a discussion explaining why). I don’t think it’s quite fair to say that any particular application of a general purpose tool is "missing" with the implication that it is essential to discuss. –jacobolus (t) 22:45, 22 October 2022 (UTC)