unsigned long to float.

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top