Extracting bits from a floating point number [message #10428] |
Thu, 20 November 1997 00:00 |
bchafin
Messages: 1 Registered: November 1997
|
Junior Member |
|
|
I have a rather peculiar problem for which I do not know if there is a solution.
I am reading a 16-bit floating point number from an HDF file using IDL's built in HDF commands. This number, of course, is typed to be a 32-bit floating point number by IDL. The problem is that this number was originally two 1-byte integers, which were stuffed together into one 16-bit field in a C program. (Don't ask why that was done.)
I need to reverse engineer the 32-bit floating point number to recall the original two 1-byte integers.
Does anyone know how (or if) this can be done?
Thanks,
Brian
--
------------------------------------------------------------ -------------
Brian Chafin
MISR Project
Science and Instrument Software Systems Group
Science Data Processing Systems Section
Jet Propulsion Laboratory
4800 Oak Grove
MS 169-315
Pasadena, CA 91109-8099
x4-3723
------------------------------------------------------------ -------------
|
|
|