Re: no backwards compatibility in IDL 5.6 [message #34230 is a reply to message #34228] |
Thu, 27 February 2003 23:42   |
Craig Markwardt
Messages: 1869 Registered: November 1996
|
Senior Member |
|
|
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.
The original behavior of ATAN with complex numbers was available from
IDL 3.6 through IDL 5.4. That's over seven releases, and nearly a
decade of stability!
Now let's get to the documentation question. The "old" behavior of
ATAN *WAS* in fact documented in the _Using IDL_ manual. A quick
check of the Signal Processing chapter, under the section "Magnitude
and Phase" shows this example:
V = FFT(U)
...
; Phase of first half of v:
phi = ATAN(V(0:N/2))
There it is right there! [ It's also indexed under "phase, signal
spectra". ] Five years ago when I was a novice on FFTs and IDL, I went
through these examples, and picked up on the techniques described
there. After all, I was learning from the experts.
Now you may ask, in what versions of the manual did this example
appear? As near as I can tell, it showed up in IDL 5.0, and kept
appearing up through 5.4. And STILL appeared in IDL 5.5. And *STILL*
appears today in IDL 5.6!!!
This posting is not really about ATAN. It's really about how RSI
appears to be making unilateral decisions about the IDL language which
breaks the compatibility of peoples' code. They should stop that.
Craig
--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
|
|
|