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

Home » Public Forums » archive » READU on IRX and Win95
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
READU on IRX and Win95 [message #16344] Tue, 20 July 1999 00:00
Paul O Storaasli is currently offline  Paul O Storaasli
Messages: 2
Registered: July 1999
Junior Member
When I use READU on the same file in Win95 and IRIX, I get different
results.
Is this possible? How would I read the file on a Win95 system?
I am trying to read a binary file of 32-bit floats with the following
code:

function readfile
; This function will read the data in 'D:\data\thunderb.653'
; as an array of floating point (32-bit) numbers. It assumes
; the array has 716 colums, and calculates the number of rows.
; It returns the array.

file='thunderb.653'

openr,LUN,file,/Get_Lun
result=fstat(LUN)
nbytes=result.size
nx=716L
ny=nbytes / 4L /nx
image=fltarr(nx,ny)
readu,LUN,image
free_lun, LUN

return, image
end

The results I get are quite different:

On Win95
IDL> print,a(1:5,1:5)
-6.32813e-023-4.27821e+008-6.32846e-023-4.27903e+008 1.08637e+024
9.04917e-041-4.27821e+008 8.09951e-043 3.67981e-042 4.16997e-008
9.24857e-044-6.32813e-023-4.27838e+008-6.33169e-023-6.33524e -023
1.08622e+024 8.09951e-043 4.16942e-008-6.33718e-023-4.28427e+008
-4.27903e+008 3.67981e-042 1.44418e-041-4.28427e+008-6.34203e-023
% Program caused arithmetic error: Floating underflow

On an IRIX system:
IDL> print,a(1:5,1:5)
32.4000 32.2000 32.9000 34.7000 35.1000
31.5000 32.2000 32.5000 34.5000 38.3000
32.0000 32.4000 32.7000 37.9000 43.4000
33.1000 32.5000 36.8000 46.4000 50.7000
34.7000 34.5000 42.0000 50.7000 53.9000
[Message index]
 
Read Message
Previous Topic: Re: READU on IRIX and Win95, Big Endian, Little Endian
Next Topic: Seeking IDL Programmers with Interests in Coastal Oceanography/Geology

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

Current Time: Sun Oct 12 18:59:59 PDT 2025

Total time taken to generate the page: 2.07696 seconds