Welcome, Guest. Please login or register.

Author Topic: Motorola FFP Hex Representation  (Read 2119 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline SidewinderTopic starter

  • Full Member
  • ***
  • Join Date: Mar 2002
  • Posts: 241
    • Show only replies by Sidewinder
    • http://www.liquido2.com
Motorola FFP Hex Representation
« 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.
Sidewinder
 

Offline PiR

  • Full Member
  • ***
  • Join Date: Apr 2003
  • Posts: 148
    • Show only replies by PiR
Re: Motorola FFP Hex Representation
« Reply #1 on: June 01, 2004, 06:31:25 PM »
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 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