Please HELP!!!!! [message #4866] |
Thu, 17 August 1995 00:00  |
phil
Messages: 15 Registered: April 1995
|
Junior Member |
|
|
Howdy,
I have a problem that is only loosely related to IDL that I hope one
of you can help me out. I want to take the bytes from a 32-bit
floating point number and determine the floating point value of it. I
can do this in IDL by the following:
IDL>a = bytarr(4)
IDL>openw,1,'temp'
IDL>writeu,1,160.0
IDL>close,1
IDL>openr,1,'temp'
IDL>readu,1,a
IDL>close,1
IDL>print,float(a,0)
160.0
IDL>print,a
67 32 0 0
Now, here is the problem. I'm trying to get the same answer by hand
and can't seem to do it. I have been doing all sorts of interations
to get the sign, exponent and mantissa for this and nothing seems to
work. I know this is simple, but I just seem to be missing something.
Could one of you people out there humble me and show me what I am
doing wrong.
TIA,
Phil
--
/*********************************************************** ****************/
Phil Williams
Postdoctoral Researcher "One man gathers what
MRI Facility another man spills..."
The Ohio State University -The Grateful Dead
email: phil@peace.med.ohio-state.edu
URL: http://justice.med.ohio-state.edu:1525
/*********************************************************** ****************/
|
|
|