comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: ATAN function with two ARGS
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: ATAN function with two ARGS [message #20279] Tue, 06 June 2000 00:00
K. Bowman is currently offline  K. Bowman
Messages: 330
Registered: May 2000
Senior Member
In article <MPG.13a582048e3c14e9989b49@news.frii.com>, David Fanning
<davidf@dfanning.com> wrote:

> Ben Tupper (tupper@seadas.bigelow.org) writes:
>
>> 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.
>
> Notice they don't say the "result of the function" is
> undefined. If they did, I could understand your confusion.
> But here they have made a truthful and accurate statement.
> *Implying* that they were talking about the result of the
> function is an old technical writers trick that allows one
> to remain truthful, while still confusing the rift-raft.


The result of ATAN(0.0,0.0) in IDL is implementation dependent, viz.


Logging into SGI IRIX
IDL Version 5.3 (IRIX mipseb). (c) 1999, Research Systems, Inc.
IDL> print, atan(0.0, 0.0)
0.00000




Logging into DEC Unix
IDL Version 5.3 (OSF alpha). (c) 1999, Research Systems, Inc.
IDL> print, atan(0.0, 0.0)
-NaN



In some cases it really is undefined. ;-)

Ken
One of the riff-raff (i.e., those people or that segment of society
regarded as worthless, disreputable, insignificant, etc.; rabble)
Re: ATAN function with two ARGS [message #20280 is a reply to message #20279] Tue, 06 June 2000 00:00 Go to previous message
Ben Tupper is currently offline  Ben Tupper
Messages: 186
Registered: August 1999
Senior Member
Ben Tupper wrote:

> In comp.lang.idl-pvwave you write:
>
>> 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
>
> When I try the above command, I get
>
> IDL> help,atan(0.0,0.0)
> <Expression> FLOAT = -NaN
>
> IDL> help,/struct,!version
> ** Structure !VERSION, 5 tags, length=80:
> ARCH STRING 'alpha'
> OS STRING 'OSF'
> OS_FAMILY STRING 'unix'
> RELEASE STRING '5.2'
> BUILD_DATE STRING 'Oct 30 1998'
>
> William Thompson
>

The above was sent to me by William Thompson. Below is the version info for
the platform not returning the undefined value.
I've sent notice of this anomaly to RSI.

Thanks,

Ben

IDL> help,!version
<Expression> STRUCT = -> !VERSION Array[1]
IDL> help,!version,/str
** Structure !VERSION, 5 tags, length=40:
ARCH STRING 'sparc'
OS STRING 'sunos'
OS_FAMILY STRING 'unix'
RELEASE STRING '5.2'
BUILD_DATE STRING 'Oct 30 1998'
IDL> help, ATAN(0.0, 0.0)
<Expression> FLOAT = 0.00000


--
Ben Tupper

Bigelow Laboratory for Ocean Science
tupper@seadas.bigelow.org

pemaquidriver@tidewater.net
Re: ATAN function with two ARGS [message #20285 is a reply to message #20279] Mon, 05 June 2000 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Ben Tupper (tupper@seadas.bigelow.org) writes:

>> From now on I'm writing
>> with a renewed spirit of obfiscation. Where's my thesarus?!
>>
>
> I'm off to a great start! Obfuscate!

Oh, shoot. And I thought you were trying to
get points with the IDL EPA nominating committee
for "unintentional humorous composition." :-)

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 #20286 is a reply to message #20285] Mon, 05 June 2000 00:00 Go to previous message
Ben Tupper is currently offline  Ben Tupper
Messages: 186
Registered: August 1999
Senior Member
Ben Tupper wrote:

> From now on I'm writing
> with a renewed spirit of obfiscation. Where's my thesarus?!
>

I'm off to a great start! Obfuscate!



--
Ben Tupper

Bigelow Laboratory for Ocean Science
tupper@seadas.bigelow.org

pemaquidriver@tidewater.net
Re: ATAN function with two ARGS [message #20287 is a reply to message #20285] Mon, 05 June 2000 00:00 Go to previous message
Ben Tupper is currently offline  Ben Tupper
Messages: 186
Registered: August 1999
Senior Member
David Fanning wrote:

> Ben Tupper (tupper@seadas.bigelow.org) writes:
>
>> 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.
>
> Notice they don't say the "result of the function" is
> undefined. If they did, I could understand your confusion.
> But here they have made a truthful and accurate statement.
> *Implying* that they were talking about the result of the
> function is an old technical writers trick that allows one
> to remain truthful, while still confusing the rift-raft.
>
> You have to read this documentation *much* more carefully,
> Ben, if you have any hopes of winning a commission
> in the IDL Expert Programmers Association. :-)
>

Geez,

I am beginning to suspect that entry into IDL EPA requires much more
subtle documentation than I have been writing. From now on I'm writing
with a renewed spirit of obfiscation. Where's my thesarus?!

You don't suppose that Oscar Gamble wrote the documentation do you?

Ben


--
Ben Tupper

Bigelow Laboratory for Ocean Science
tupper@seadas.bigelow.org

pemaquidriver@tidewater.net
Re: ATAN function with two ARGS [message #20288 is a reply to message #20285] Mon, 05 June 2000 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Ben Tupper (tupper@seadas.bigelow.org) writes:

> 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.

Notice they don't say the "result of the function" is
undefined. If they did, I could understand your confusion.
But here they have made a truthful and accurate statement.
*Implying* that they were talking about the result of the
function is an old technical writers trick that allows one
to remain truthful, while still confusing the rift-raft.

You have to read this documentation *much* more carefully,
Ben, if you have any hopes of winning a commission
in the IDL Expert Programmers Association. :-)

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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Advanced Programming Course in Europe
Next Topic: Re: Postscript Output with Object Graphics?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:53:11 PDT 2025

Total time taken to generate the page: 0.00603 seconds