Re: no backwards compatibility in IDL 5.6 [message #34228 is a reply to message #34227] |
Fri, 28 February 2003 05:59   |
R.G. Stockwell
Messages: 363 Registered: July 1999
|
Senior Member |
|
|
Craig Markwardt wrote:
> notspecified@dev.null (Matt Feinstein) writes:
>
>> I think this explains it adequately. In older versions, ATAN with a
>> complex argument returned a useful number --but the number it
>> returned didn't happen to be the arctangent of a complex argument!
>> Perhaps people should take a close look at Abramowitz and Stegun,
>> equation 4.4.39.
>
>
> Matt, let me say that I totally agree. The original behavior of ATAN
> was the correct implementation of the incorrect algorithm.
>
>
>> FWIW, if you write a program that uses incorrect, undocumented
>> behavior, you are asking for trouble. RSI can be blamed for not
>> providing a fast ARG or PHASE function, but this is a venial sin, at
>> worst. IMHO.
>
>
> Here is where I completely disagree. RSI covered up their original
> "oops" with another even bigger oops. There is no excuse to break an
> existing, working, interface in minor-release software. I realize
> that having ATAN do the correct "Abramowitz & Stegun" thing is more
> elegant, but I still argue that compatibility and maintainability
> always trumps elegance, at least in minor releases. RSI had their
> chance at elegance the first time around.
...
>
> Craig
>
Be it foolish, but I don't agree with you. I think RSI did the right
thing by "finally" correcting the behaviour of the atan(), even if it
does break existing code. Because now all the user's bitch and moan :),
and fix their code, and never have a problem again with atan().
If they left it as it was, then for the next 100 years, new users would
be bitching and moaning about how the atan() doesn't work for
complex numbers.
As a case in point, check out recent discussions on the /center keyword
in convol. :)
Cheers,
bob
PS, of course, fixing it correctly the first time would have been the thing
to do, rather than requiring a case statement to handle the different IDL versions. :)
And there is always the case to be made that an ATAN function should only
calculate the atan, and the argument of a complex number should be a seperate
modular function.
|
|
|