Adam Wiggins wrote: > On Mon, 7 Sep 1998, Ben Greear wrote: > > float f = 42.5; > > char* bytes = (char*)(&f); > Not only that, but if you decide to compile with -ffast-math one day, you > may get some funny results. Depending on the compiler the following should fix errors introduced by optimization? volatile float f = 42.5f; -- Ola Fosheim Groestad,Norway
- [MUD-Dev] Re: [CODE QUESTION] How to encode floats into bytes?, (continued)
- [MUD-Dev] Re: [CODE QUESTION] How to encode floats into bytes?, Ola Fosheim Grøstad olag#ifi,uio.no, Mon 07 Sep 1998, 20:44 GMT
- [MUD-Dev] Re: [CODE QUESTION] How to encode floats into bytes?, Ben Greear greear#cyberhighway,net, Mon 07 Sep 1998, 21:41 GMT
- [MUD-Dev] Re: [CODE QUESTION] How to encode floats into bytes?, T. Alexander Popiel popiel#snugharbor,com, Mon 07 Sep 1998, 22:44 GMT
- [MUD-Dev] Re: [CODE QUESTION] How to encode floats into bytes?, Adam Wiggins adam#angel,com, Tue 08 Sep 1998, 19:26 GMT
- [MUD-Dev] Re: [CODE QUESTION] How to encode floats into bytes?, Ola Fosheim Grøstad olag#ifi,uio.no, Wed 09 Sep 1998, 19:14 GMT
- [MUD-Dev] Re: [CODE QUESTION] How to encode floats into bytes?, Travis S. Casey efindel#io,com, Wed 09 Sep 1998, 19:43 GMT
- [MUD-Dev] Re: [CODE QUESTION] How to encode floats into bytes?, Ola Fosheim Grøstad olag#ifi,uio.no, Thu 10 Sep 1998, 08:07 GMT
- [MUD-Dev] Re: [CODE QUESTION] How to encode floats into bytes?, Ben Greear greear#cyberhighway,net, Mon 07 Sep 1998, 17:47 GMT
- [MUD-Dev] Re: [CODE QUESTION] How to encode floats into bytes?, Richard Woolcock KaVir#dial,pipex.com, Mon 07 Sep 1998, 18:05 GMT