in reply to Unpacking Floating Point on architectures with different endians


If both platforms use IEEE 754 format then you can just reverse the result of unpack "f" to change endianess.

For a portable method of unpacking IEEE 754 floats see Re: Extracting IEEE 754 floating point numbers.

I've been planning to roll this and some other methods into a Pack::Float module. I have the code written but I haven't had time to write a good test suite (the hard part ;-) ).

--
John.

  • Comment on Re: Unpacking Floating Point on architectures with different endians