🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.protocols.ibm
Article #1687

IBM, IEEE conversion

#1687
From: Marc PARIGOT
Date: Mon, 18 Dec 1989 10:42
21 lines
1272 bytes
        Hello,

I'm looking, for RPC purpose, a simple and fast way to convert IBM floatting
        point format number into IEEE format number and vice-versa:

        -------------------------        ----------------------------
        |s| exp |  mantissa     |  <==>  |   mantissa      | exp  |s|
        -------------------------        ----------------------------
                fibm                             fieee


 fibm = (-1)**s * (16)**(exp1-64) * mantissa1
 fieee = (-1)**s * 2**(exp2-127) * mantissa2

 ibm_to_ieee(exp1, mantissa1, &exp2, &mantissa2);
 ieee_to_ibm(exp2, mantissa2, &exp1, &mantissa1);

                Thanks for your time.

                                        Marc (E.mail: Marc.Parigot@depr.bull.fr)
Technical Details
Message-ID: <8912181302.AA15142@lilac.berkeley.edu>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!tut.cis.ohio-state.edu!ucbvax!bpe2.spix7.depr.bull.FR!marc

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!tut.cis.ohio-state.edu!ucbvax!bpe2.spix7.depr.bull.FR!marc
From: marc@bpe2.spix7.depr.bull.FR (Marc PARIGOT)
Newsgroups: comp.protocols.ibm
Subject: IBM, IEEE conversion
Message-ID: <8912181302.AA15142@lilac.berkeley.edu>
Date: 18 Dec 89 10:42:00 GMT
Sender: daemon@ucbvax.BERKELEY.EDU
Reply-To: Marc PARIGOT
              <mcsun!inria!bull!bpe2.spix7.depr.bull.fr!marc@UUNET.UU.NET>
Organization: The Internet
Lines: 21