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

Home » Public Forums » archive » Re: Floating point system variables on RS6000
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: Floating point system variables on RS6000 [message #712] Tue, 24 November 1992 08:22
bowman is currently offline  bowman
Messages: 121
Registered: September 1991
Senior Member
In article <1et89fINNlkn@rave.larc.nasa.gov>, zawodny@arbd0.larc.nasa.gov
(Dr. Joseph M Zawodny) wrote:
>
> Ken,
>
> One good reason is that IDL variables change their type "on the fly."
> If !PI or any of the others were double precision, the double precision math
> would propagate throughout the program. Those of us who do single precision
> calculations would have to FLOAT(!PI) to keep our programs single precision and
> fast.

I understand this is true on most machines, but on the RS6000 double
precision is usually faster than single precision, because all single
precision values must be converted to double precision for the floating
point unit and then converted back. In some circumstances, double
precision is slower because the cache size is effectively reduced to half
as large. So _memory_ may be a problem if intermediate results are stored
in double precision, but (on the RS6000) _speed_ is generally not a problem
when working in double precision.

Since there is a !DPI system variable, how about a !DDTOR and !DRADDEG?
(It's OK, I'll just make one myself. Like I do in Fortran. ;-) )
Re: Floating point system variables on RS6000 [message #713 is a reply to message #712] Tue, 24 November 1992 04:47 Go to previous message
zawodny is currently offline  zawodny
Messages: 121
Registered: August 1992
Senior Member
Ken,

One good reason is that IDL variables change their type "on the fly."
If !PI or any of the others were double precision, the double precision math
would propagate throughout the program. Those of us who do single precision
calculations would have to FLOAT(!PI) to keep our programs single precision and
fast.

Joseph M. Zawodny (KO4LW) NASA Langley Research Center
zawodny@arbd0.larc.nasa.gov MS-475, Hampton VA, 23681
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Floating point system variables on RS6000
Next Topic: Re: open,/record - classification

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

Current Time: Wed Oct 08 13:33:50 PDT 2025

Total time taken to generate the page: 0.00690 seconds