IEEE-754 Single Precision Calculator

Started by mdmwii, September 10, 2009, 03:57:55 PM

Previous topic - Next topic

mdmwii

An accurate conversion could be obtained from this site: http://babbage.cs.qc.edu/IEEE-754/

But I created an application to easily convert IEEE hex to decimal and viceversa: http://www.mediafire.com/?ubwdtawzyzk

I hope it could be useful.



dcx2

FYI, the code database also has a single precision converter

http://www.geckocodes.org/index.php?arsenal=3

However, the babbage site can also do double-precision conversions, so it is still a useful link.

James0x57

@mdmwii: Thanks for the tool!



@dcx2: ..I've never used double precision in hacking codes. Do you think it would be useful for me to add that to GeckoCodes?

The conversion* on the geckocodes page is done with PHP so I can very easily add a switch to handle double-precision. (will probably wait until after the redesign if you want it though)



(*there's no math calculation- it's just doing a different view on the same float data and AJAX'd back to the page**)
(**JavaScript 2.0 can do this on its own- very powerful feature!!)


dcx2

This thread is necro'd btw.  Originally Sept 2009.  But I check the "what is currently being read" topics list sometimes, and I noticed someone was reading this topic.

re: double precision, if you've ever seen lfd or stfd, then the game was using double precision.  Most of the time, though, it's just used for converting integers to floats and vice versa.  Single precision only has a (iirc) 24-bit mantissa, so a 32-bit integer won't fit into it properly.  Since double precision has a 48-bit mantissa, you can fit a 32-bit integer into it without losing precision.  That's why doubles are used to convert ints to floats and vice versa.

I don't think any games actually have a need for accuracy that goes beyond single precision.

James0x57

oh whoops! lol


re: re: double precission, Ah, good to have that confirmation. Thanks!