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

Home » Public Forums » archive » ATAN inconsistencies
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
ATAN inconsistencies [message #17729] Fri, 12 November 1999 00:00 Go to next message
bowman is currently offline  bowman
Messages: 121
Registered: September 1991
Senior Member
Here's a platform dependency that took me quite a while to track down.

The SGI (IRIX) version of IDL returns 0.0 when you try to take the
arctan(0/0). The Alpha version (properly) returns a NaN.

Ken Bowman


IDL Version 5.1 (IRIX mipseb). Research Systems, Inc.
IDL> print, atan(0.0, 0.0)
0.00000


IDL Version 5.1 (OSF alpha). Research Systems, Inc.
IDL> print, atan(0.0, 0.0)
NaNQ
% Program caused arithmetic error: Floating illegal operand

--
Dr. Kenneth P. Bowman, Professor 409-862-4060
Department of Meteorology 409-862-4466 fax
Texas A&M University bowmanATcsrp.tamu.edu
College Station, TX 77843-3150 Replace AT with @
Re: ATAN inconsistencies [message #17848 is a reply to message #17729] Mon, 15 November 1999 00:00 Go to previous message
bowman is currently offline  bowman
Messages: 121
Registered: September 1991
Senior Member
In article <383028E8.B9B90A11@astro.estec.esa.nl>, Michael Werger
<mwerger@astro.estec.esa.nl> wrote:

> IDL 5.2 on Solaris 2.7:
>
> IDL> print, atan(0.0, 0.0)
> 0.00000
> ... Any comments about the proper handling? ;-)

Well, if x=y=0, then ATAN(y/x) is not defined, so it should return a NaN.

Ken
Re: ATAN inconsistencies [message #17857 is a reply to message #17729] Mon, 15 November 1999 00:00 Go to previous message
Michael Werger is currently offline  Michael Werger
Messages: 34
Registered: May 1997
Member
"Kenneth P. Bowman" wrote:
>
> Here's a platform dependency that took me quite a while to track down.
>
> The SGI (IRIX) version of IDL returns 0.0 when you try to take the
> arctan(0/0). The Alpha version (properly) returns a NaN.
>
> Ken Bowman
>
> IDL Version 5.1 (IRIX mipseb). Research Systems, Inc.
> IDL> print, atan(0.0, 0.0)
> 0.00000
>
> IDL Version 5.1 (OSF alpha). Research Systems, Inc.
> IDL> print, atan(0.0, 0.0)
> NaNQ
> % Program caused arithmetic error: Floating illegal operand

IDL 5.2 on Solaris 2.7:

IDL> print, atan(0.0, 0.0)
0.00000
... Any comments about the proper handling? ;-)

--
Michael Werger ------------o
ESA ESTEC & Praesepe B.V. |
Astrophysics Division mwerger@astro.estec.esa.nl|
| Postbus 299 http://astro.estec.esa.nl |
| 2200 AG Noordwijk +31 71 565 3783 (Voice)
o------------------- The Netherlands +31 71 565 4690 (FAX)
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Inheritance query
Next Topic: IDL Benchmark Anomaly

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

Current Time: Wed Oct 08 15:17:45 PDT 2025

Total time taken to generate the page: 0.00642 seconds