Path: 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 References: 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)