Floating point Endianness?

假装没事ソ 提交于 2019-11-27 08:49:06
Gregor Brandt

Yes, floating point can be endianess dependent. See Converting float values from big endian to little endian for info, be sure to read the comments.

According to Wikipedia,

Floating-point and endianness

On some machines, while integers were represented in little-endian form, floating point numbers were represented in big-endian form. Because there are many floating point formats, and a lack of a standard "network" representation, no standard for transferring floating point values has been made. This means that floating point data written on one machine may not be readable on another, and this is the case even if both use IEEE 754 floating point arithmetic since the endianness of the memory representation is not part of the IEEE specification.

EDIT: THE FOLLOWING IS WRONG ANSWER (leaving so that people know that this 'somewhat popular' view is wrong, please read the accepted answer and comments on this answer)

--WRONG ANSWER BEGIN--

There is no such thing as floating point endianness or integer endianness etc. Its just binary representation endianness. Either a machine is little-endian, or its big-endian. Which means that it will either represent the MSb/MSB in the binary representation of any datatype as its first bit/byte or last bit/byte. Thats it.

--WRONG ANSWER END---

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!