Amiga.org
Operating System Specific Discussions => Amiga OS => Amiga OS -- Development => Topic started by: Sidewinder on May 22, 2004, 03:28:21 AM
-
Hello,
I'm looking for an algorithm to convert a C float or double value into a string that contains the hex representation of the Motorola Fast Floating Point (FFP) form of the same value.
Does this make sense? I think so...
I'd settle for a good discussion of how the Motorola FFP data is formatted.
Thanks.
-
Hi
I understand what do you plan to do,but what for?
Anyway if you want to do it even just for fun, you can find for example here (http://www.quartus.net/products/forth/manual/floats.htm) the definition of the FFP representation.
Procedure to convert FFP to IEEE single precision is builtin function in mathffp.library (haven't verified it).
However be carefull because AFAIK FFP is the most limited representation, when comparing to single and double IEEE - it has smaller maximal values (both positive and negative), and does not define representations for infinitive and NaNs. So some IEEE are unrepresentable as FFP.
Looks like the end of discussion. ;-)
Cheers