🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.protocols.ibm
Article #1686

IBM, IEEE conversion

#1686
From: Marc PARIGOT
Date: Mon, 18 Dec 1989 10:42
20 lines
1077 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: <229@bull.bull.fr>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!inria!bull!bpe2.spix7.depr.bull.fr!marc

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!inria!bull!bpe2.spix7.depr.bull.fr!marc
From: marc@spix7.depr.bull.fr ( Marc PARIGOT )
Newsgroups: comp.protocols.ibm
Subject: IBM, IEEE conversion
Message-ID: <229@bull.bull.fr>
Date: 18 Dec 89 10:42:00 GMT
Sender: news@bull.bull.fr
Reply-To: marc@bpe2.UUCP ( Marc PARIGOT )
Organization: BULL S.A., Paris , France
Lines: 20