AnsweredAssumed Answered

vrf decoding "4Byte single precision"-Format to real

Question asked by VRFuser on Oct 15, 2002
> Hello all,
> i've 4 Byte from a measurementequiment
> byte1 =3D FFFF.FFFF
> byte2 =3D FFFF.FFFF
> byte3 =3D EFFF.FFFF
> byte4 =3D SEEE.EEEE
> with    F =3D fractionsbits
>         E =3D exponent-bits
>         S =3D Sign-bit
> how decoding to real?
> has somebody a function ?

I'm sorry I don't understand you notation exactly, but this should not
be too hard.
What you need to do is take the bits you have and rearrange them in
the order of a real used by VEE, write them binary to a file, and read
it back as a real.  This is not as slow as it might sound for 1 or 2
and for large quantities, just write them all at once anre read them
all back at once.
I believe that VEE uses IEEE reals whose format is well known and
documented.  You can also play around and verify the format yourself
by running the process in reverse - Write a few select reals to a file
and look at the bytes.  The reals I would select are -4, -2, -1, 0, 1,
3, 7, 14, 28, 56 which should let you see the format pretty clearly.


You are currently subscribed to vrf as:
To subscribe send a blank email to "".
To unsubscribe send a blank email to "".
To send messages to this mailing list,  email "". 
If you need help with the mailing list send a message to "".