UNIT8 and floating point data (fwd)

> I'd like to use UNIT8 variables to represent arbitrary floating point fields 
> in
> cases where total storage is more important than precision.  Looking through
> the documentation, I couldn't find any obvious, standard, or semi-standard way
> of associating floating point values with bytes.  Ideally, I want a table with
> 256 FLOAT32 elements that I can just do a lookup with.  I can do that
> automatically and quickly internally to my visualization program, and I've 
> used
> it for radar data in the NEXRAD format already.

Isnt there currently a 'standard' of any kind for saving floating point
numbers in 1,2,3,4, and 8 byte representations?  obviously the 4 and 8 byte
representations are IEEE standards, but it seems as if it shouldnt be too much
work to read and encode arbitrary length byte arrays as floats, without having
to resort to table matching.  Table matching, of course, could give you
unlimited sigifigance as long as your set of values is repetitive, where
the aribitrary length floats would have signifigance and range proportionate to
their size...

with a set of calls like

float ConvertByteFloat(int Nbytes,char* ByteStream);
double ConvertByteFloat(int Nbytes,char* ByteStream);

real*4 function ConvertByteFloat(Nbytes,ByteStream)
integer*4 Nbytes
character*(*) ByteStream

real*8 ConvertByteDouble(Nbytes,ByteStream)
integer*4 Nbutes
character*(*) ByteStream

.... that is, of course, if these dont exist...?

bcl
blincoln@xxxxxxxxxx



  • 1994 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: