From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,4e5ff08a0f67018 X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1993-10-08 16:23:46 PST Newsgroups: comp.sys.dec Path: gmd.de!xlink.net!howland.reston.ans.net!math.ohio-state.edu!cs.utexas.edu!uunet!amiserv!obdient!vpnet!kferg From: kferg@vpnet.chi.il.us (Kevin Ferguson) Subject: Re: "byte sex" or "endian" conversion program Message-ID: <1993Oct8.203318.18135@vpnet.chi.il.us> Organization: Vpnet - Public Access Unix and Usenet References: <1993Oct2.212547.17237@syma.sussex.ac.uk> <28pio0$sgh@jac.nuo.dec.com> Date: Fri, 8 Oct 1993 20:33:18 GMT In article <28pio0$sgh@jac.nuo.dec.com>, Steve Lionel wrote: [...snip...] > >If you're dealing with converting floating-point data between a >big-endian IEEE system and VAX, you'll need to swap the byte order of >integers and do a big-endian-IEEE-to-VAX floating conversion. [...snip...] I have a question regarding the IEEE-to-VAX F_floating point conversion. I was recently presented with a pair of routines that supposedly performed this conversion in each direction. The amazing thing was (to me anyway) that they obtained the VAX float format by swapping bytes as you indicated and then just multiplying by 4. I was under the inpression that, due to the different normalized forms of both the exponent and mantissa, the conversion was more involved than that. If memory serves me right (I don't have a copy of IEEE-754), IEEE format uses an excess-127 form for its exponent and represents the most-significant fraction bit. The VAX F_floating point uses an excess-128 form and the most-significant fraction bit is implicitly assumed. Am I missing something here? TiA, kevin ferguson (sorely confused) -- "Face piles of trials with smiles. Kevin Ferguson It riles them to believe that kferg@vpnet.chi.il.us you perceive the web they weave." - Moody Blues