Re: Alternative atan2 (was Re: Motion 52: final ...)
On Wed, Nov 27, 2013 at 7:39 AM, Vincent Lefevre <vincent@xxxxxxxxxx> wrote:
> On 2013-11-27 11:46:19 +0000, John Pryce wrote:
>> I think atan2 is the only one that can be "improved" by this method.
>
> I also think so.
>
>> Basically, for any box (yy,xx) in R^2 that doesn't contain (0,0),
>> but meets the usual branch cut of atan2, the idea is to rotate the
>> branch cut out of the way of the box. Depending on the rule for
>> which direction to rotate, one gets different answers for the range
>> of the resulting function. Bill, is that right?
>>
>> It's a neat idea. Jürgen, would you consider adding this to function
>> to our list (recommended, I would say)? Who supports this?
>
> IMHO, the alternative function should have a different name, so that
> it is not confused with the usual atan2 function (standardized in
> ISO C, POSIX and IEEE 754-2008 at least). This traditional atan2
> function should still be supported in P1788, as it could be useful
> to obtain proved results (enclosures...) on this function.
Absolute agreement here.
There is no justification for changing the name or specifications of
the classic atan2(). It needs to return an interval within +/-tau/2.
However, the addition of a non-inflationary function, say
atan2_sharp(), would be valuable. In addition to a different name, it
needs a careful definition of its specification.
I suggest that atan2_sharp() be specified such that it returns the
same two points as atan2(), with one end point adjusted by tau so that
the result is (i) sharp, and (ii) centered as closely as possible on
the true mathematical result.
Lee Winter
Nashua, New Hampshire
United States of America