WiiRd forum

Wii & Development => Wii & Gamecube Hacking Tools => Topic started by: mdmwii on September 10, 2009, 02:57:55 PM



Title: IEEE-754 Single Precision Calculator
Post by: mdmwii on September 10, 2009, 02:57:55 PM
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.



Title: Re: IEEE-754 Single Precision Calculator
Post by: Panda On Smack on September 10, 2009, 11:05:22 PM
Thanks dude


Title: Re: IEEE-754 Single Precision Calculator
Post by: dcx2 on May 02, 2011, 04:35:17 PM
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.


Title: Re: IEEE-754 Single Precision Calculator
Post by: James0x57 on May 02, 2011, 08:59:56 PM
@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!!)


Title: Re: IEEE-754 Single Precision Calculator
Post by: dcx2 on May 02, 2011, 09:05:08 PM
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.


Title: Re: IEEE-754 Single Precision Calculator
Post by: James0x57 on May 02, 2011, 10:04:30 PM
oh whoops! lol


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