• <small id='Jm8ef'></small><noframes id='Jm8ef'>

      <bdo id='Jm8ef'></bdo><ul id='Jm8ef'></ul>
    <legend id='Jm8ef'><style id='Jm8ef'><dir id='Jm8ef'><q id='Jm8ef'></q></dir></style></legend>
  • <i id='Jm8ef'><tr id='Jm8ef'><dt id='Jm8ef'><q id='Jm8ef'><span id='Jm8ef'><b id='Jm8ef'><form id='Jm8ef'><ins id='Jm8ef'></ins><ul id='Jm8ef'></ul><sub id='Jm8ef'></sub></form><legend id='Jm8ef'></legend><bdo id='Jm8ef'><pre id='Jm8ef'><center id='Jm8ef'></center></pre></bdo></b><th id='Jm8ef'></th></span></q></dt></tr></i><div id='Jm8ef'><tfoot id='Jm8ef'></tfoot><dl id='Jm8ef'><fieldset id='Jm8ef'></fieldset></dl></div>
      <tfoot id='Jm8ef'></tfoot>

      1. 浮点字节序?

        时间:2023-09-17

          <small id='FOEK8'></small><noframes id='FOEK8'>

          <tfoot id='FOEK8'></tfoot>
            <bdo id='FOEK8'></bdo><ul id='FOEK8'></ul>

              <i id='FOEK8'><tr id='FOEK8'><dt id='FOEK8'><q id='FOEK8'><span id='FOEK8'><b id='FOEK8'><form id='FOEK8'><ins id='FOEK8'></ins><ul id='FOEK8'></ul><sub id='FOEK8'></sub></form><legend id='FOEK8'></legend><bdo id='FOEK8'><pre id='FOEK8'><center id='FOEK8'></center></pre></bdo></b><th id='FOEK8'></th></span></q></dt></tr></i><div id='FOEK8'><tfoot id='FOEK8'></tfoot><dl id='FOEK8'><fieldset id='FOEK8'></fieldset></dl></div>
                  <tbody id='FOEK8'></tbody>
                <legend id='FOEK8'><style id='FOEK8'><dir id='FOEK8'><q id='FOEK8'></q></dir></style></legend>
                1. 本文介绍了浮点字节序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我正在为实时离岸模拟器编写客户端和服务器,并且由于我必须通过套接字发送大量数据,因此我使用二进制数据来最大化我可以发送的数据量.我已经知道整数字节序,以及如何使用 htonlntohl 来规避字节序问题,但是我的应用程序,几乎所有的模拟软件,都处理大量的浮点数.

                  I'm writing a client and a server for a realtime offshore simulator, and, as I have to send a lot of data through a socket, I'm using binary data to maximize the amount of data I can send. I already know about integers endianness, and how to use htonl and ntohl to circumvent endianness issues, but my application, as almost all simulation software, deals with a lot of floats.

                  我的问题是:在处理浮点数的二进制格式时是否存在字节序问题?我知道我的代码将运行的所有机器都使用浮点的 IEEE 实现,但是在处理浮点数时是否存在一些字节序问题?

                  My question is: Is there some issue of endianness when dealing with binary formats of floating point numbers? I know that all the machines where my code will run use IEEE implementation of floating points, but is there some endianness issue when dealing with floats?

                  由于我只能访问具有相同字节序的机器,因此我无法自己测试.所以,如果有人能帮助我,我会很高兴.

                  Since I only have access to machines with the same endian, I cannot test this by myself. So, I'll be glad if someone can help me with this.

                  推荐答案

                  是的,浮点数可以依赖字节序.请参阅将浮点值从大端转换为小端有关信息,请务必阅读评论.

                  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.

                  这篇关于浮点字节序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:Boost::Asio : io_service.run() vs poll() 或者我如何在 m 下一篇:检测何时拔下网线

                  相关文章

                  最新文章

                    <bdo id='9pkRz'></bdo><ul id='9pkRz'></ul>
                2. <small id='9pkRz'></small><noframes id='9pkRz'>

                  <tfoot id='9pkRz'></tfoot><legend id='9pkRz'><style id='9pkRz'><dir id='9pkRz'><q id='9pkRz'></q></dir></style></legend>

                    1. <i id='9pkRz'><tr id='9pkRz'><dt id='9pkRz'><q id='9pkRz'><span id='9pkRz'><b id='9pkRz'><form id='9pkRz'><ins id='9pkRz'></ins><ul id='9pkRz'></ul><sub id='9pkRz'></sub></form><legend id='9pkRz'></legend><bdo id='9pkRz'><pre id='9pkRz'><center id='9pkRz'></center></pre></bdo></b><th id='9pkRz'></th></span></q></dt></tr></i><div id='9pkRz'><tfoot id='9pkRz'></tfoot><dl id='9pkRz'><fieldset id='9pkRz'></fieldset></dl></div>