From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cebf,eb58654c5683eea0 X-Google-Attributes: gid10cebf,public X-Google-Thread: 1164f8,eb58654c5683eea0 X-Google-Attributes: gid1164f8,public From: john@yrl.co.uk (John Laird) Subject: Re: VAX D-Float format Date: 1997/11/10 Message-ID: #1/1 X-Deja-AN: 288232322 References: <34575f82.182344367@serve.installshield.com> <3461DAA6.41C6@alpha.ece.jhu.edu> X-NNTP-Posting-Host: mailgate.yrl.co.uk [194.159.108.1] Organization: Yezerski Roper Ltd Newsgroups: comp.sys.dec,comp.sys.dec.micro In article <3461DAA6.41C6@alpha.ece.jhu.edu>, Philippe Pouliquen writes: > >(much snipped) > > Here is the generic bit pattern for the VAX and IEEE floats: > > Sign Exponent Mantissa IEEE value VAX value > > 0 1000...000 000...000 2^1=2 2^0=1 > I will bet you the Alphastation on my desk that you are wrong (and it's not even mine to gamble). This bit pattern interpreted as either F_floating or D_floating on a VAX (or an Alpha) is _0.5_. The zero mantissa represents a binary fraction of 0.1 or 1/2. The exponent of 128, after removal of the 128 excess, is 0. So we have 1/2 times 2 raised to the power 0, ie. 0.5 ! I believe IEEE normalises to 1.F as opposed to 0.F (as Steve Lionel correctly stated), and the excess is also different by 1, resulting in a factor of 4 when comparing the same bit pattern against F_FLOAT or D_FLOAT. -- John Laird (john@yrl.co.uk) "I have discovered a truly elegant sig, Yezerski Roper Ltd sadly there is no room here to show it." http://www.yrl.co.uk