[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ATAN inconsistencies



"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)