ATAN function with two ARGS [message #20289] |
Mon, 05 June 2000 00:00  |
Ben Tupper
Messages: 186 Registered: August 1999
|
Senior Member |
|
|
Hello,
I have bumped into a conflict between the IDL documentation and IDL output.
From the IDL (5.2) docs, the optional argument Y is described as follows:
-------START
Y
An optional argument.
If this argument is supplied, ATAN returns the angle whose tangent
is equal to Y/X. If both arguments are zero, the result is undefined.
------END
So I tried the following...
IDL> help, ATAN(0.0,0.0)
<Expression> FLOAT = 0.00000
Uhoh! Is it me, or is it Monday morning syndrome?
Ben
--
Ben Tupper
Bigelow Laboratory for Ocean Science
tupper@seadas.bigelow.org
pemaquidriver@tidewater.net
|
|
|
Re: ATAN function with two ARGS [message #20374 is a reply to message #20289] |
Tue, 06 June 2000 00:00  |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Paul Hick (pphick@ucsd.edu) writes:
> I presume that IDL is compiled with whatever math libraries are
> available on any particular operating system, so it will inherit
> whatever peculiarities (not necessarily the same on every OS) are in
> there.
Shoot. I liked my "technical writer's trick" theory better.
More malevolent. :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|
Re: ATAN function with two ARGS [message #20375 is a reply to message #20289] |
Tue, 06 June 2000 00:00  |
Paul Hick
Messages: 9 Registered: November 1999
|
Junior Member |
|
|
I presume that IDL is compiled with whatever math libraries are
available on any particular operating system, so it will inherit
whatever peculiarities (not necessarily the same on every OS) are in
there. Another example: raise NaN to a floating point power on a Windows
machine:
IDL> print, !values.f_nan^2.0
0.000000
% Program caused arithmetic error: Floating illegal operand
IDL> print, !version
{ x86 Win32 Windows 5.3.1 Feb 23 2000}
IDL on Linux, for instance, gives the proper response:
IDL> print, !values.f_nan^2.0
NaN
IDL> print, !version
{ x86 linux unix 5.3 Nov 11 1999}
Paul
--
____________________________________________________________ _____
| Paul Hick (pphick@ucsd.edu) |
| Office : SERF Rm. 302 Smail : UCSD/CASS/0424 |
| Phone : (858) 534-8965 9500 Gilman Drive |
| Fax : (858) 534-0177 La Jolla CA 92093-0424 |
| WWW : http://casswww.ucsd.edu/personal/Plh.html |
|___________________________________________________________ ______|
|
|
|