Connecting Tech Pros Worldwide Help | Site Map

float: IEEE, big endian, little endian

  #1  
Old July 22nd, 2005, 06:10 AM
Ernst Murnleitner
Guest
 
Posts: n/a
Dear readers,

Maybe someone can help:

I need to exchange data with a PLC. My computer (Linux on intel) uses the
intel format (little endian), the other device uses the motorola format (big
endian).

So I have to change the order of the bytes for "int". But for "float":

A) I do not know, if the order has also to be changed for float.

B) As the float datatype can have any format, is there a function in the
library to ensure, that I can get a 32bit IEEE floating point number?

Greetings
Ernst






Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
Bit representation of a float Gary Baydo answers 7 August 18th, 2007 09:35 PM
Multiply float by -1: fast or slow? Chris Stankevitz answers 10 January 25th, 2007 08:35 AM
Inconsistency producing constant for float "infinity" Peter Hansen answers 5 August 13th, 2006 12:05 AM
C code for converting IBM/370 floating point to IEEE 754? Benjamin Rutt answers 2 November 15th, 2005 12:00 AM