How to convert or cast a float into its bit sequence such as a long

前端 未结 5 749
死守一世寂寞
死守一世寂寞 2021-01-13 02:24

Good day, I am working in a 16-bit C environment, and I want to convert a float value into its bit sequence such as an integer value. There are multiple ways I know how to a

5条回答
  •  自闭症患者
    2021-01-13 03:16

    I am assuming that these floats are constants and therefore you could just write a small program to do it as a one off exercise - generate the output as required. From that small program do a cut'n'paste job into the other code.

    If you have a lot of them, why not just write a script to create the appropriate file for C.

提交回复
热议问题