K
kingjames
I have a c30 to ieee float converter algorithm that takes binary data from a
c30, does some bit munipulation and stores the answer (i'm using unsigned
longs for the processing). When I come up with the answer, if I was in C or
Fortran, I could use either a union or equivalence to see the number in
floating point rather than the representation in unsigned long. I have
found no equivalence in python of union or equvalence. I could take the
unsigned long, write it to a binary file and read it back in as a float.
This would work, accept I do not want the overhead of io. What can I do to
see this unsigned long as a float?
Thanks
c30, does some bit munipulation and stores the answer (i'm using unsigned
longs for the processing). When I come up with the answer, if I was in C or
Fortran, I could use either a union or equivalence to see the number in
floating point rather than the representation in unsigned long. I have
found no equivalence in python of union or equvalence. I could take the
unsigned long, write it to a binary file and read it back in as a float.
This would work, accept I do not want the overhead of io. What can I do to
see this unsigned long as a float?
Thanks