Unix to Vax floating point conversion [message #4881] |
Tue, 15 August 1995 00:00 |
R. David Baker
Messages: 1 Registered: August 1995
|
Junior Member |
|
|
We are using PVWave Version 5.0 on a VMS Vax, and need to read in IEEE
binary from a Sun Sparc2. We tried to use the CONV_UNIX_VAX procedure
from the IDL Astronomy User's Library
(http://idlastro.gsfc.nasa.gov/contents.html), but didn't get it to
work correctly. Here's what we did:
get_lun,unit
openr,unit,filename
readu,unit,i,t ; i is an integer to read the Sun Fortran
; header and t is a floating point array
free_lun,unit
print,t ---> show unconverted numbers
CONV_UNIX_VAX,t,source_arch='sparc'
print,t ---> show converted numbers
The array t should be a 100 element array with floating values
from 1.0 to 100.0. When we 'print,t', things look good except for
numbers of even powers of two, i.e. 0,4,16,64. These values are set
to 0.0 instead of the appropriate power of two. Any suggestions?
Dave
|
|
|