Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is this possible? Brute force conversion
#1
Cast doesn't do what I want it to do. I have a single precision float that I want to store in an array of integers. They are both 32 bits so it's possible. I want a way to convert 12.3423 into an integer and then back to 12.3423.

The binary representation of 12.3423 is 01000001010001010111101000010000 (IEEE 754) which is 1,095,072,272 in integer format.

Doing int = cast(single, sing) gives me a value of 12 for int.
f you play a Microsoft CD backwards you can hear demonic voices. The scary part is that if you play it forwards it installs Windows.
Reply


Messages In This Thread
Is this possible? Brute force conversion - by wallace - 01-20-2007, 09:44 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)