This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: exotic floating point formats test
On Sat, Mar 10, 2001 at 09:13:24AM +0100, Lars Brinkhoff wrote:
> "Zack Weinberg" <zackw@stanford.edu> writes:
> > I'd appreciate knowing what this program prints on a VAX (or an Alpha
> > asked to use VAX floating point), an IBM mainframe target, and a C4x
> > processor. For reference:
> >
> > i686-pc-linux-gnu $ ./a.out
> > 3.25098346789696250880e+01 46454443 42414040 FEDC BA@@
> > sparc-sun-solaris2.7 $ ./a.out
> > 3.25098346789696250880e+01 40404142 43444546 @@AB CDEF
>
> You didn't ask for it, but here is the data for a PDP-10 using double
> format floating-point. (There is also a "giant format".)
>
> pdp10-xkl-tops20 @ a.out
> 3.25098346789696250776e+01 861042890 d1221451ff ..(. ."..
GCC doesn't presently support the pdp10, but we might want to at some
point in the future. I know there was some group working on a modern
implementation of the architecture and O/S (which might be you, huh?)
> > If you want to be clever and come up with floating point numbers that
> > generate recognizable, distinct, strings in those formats, that'd be
> > even niftier.
>
> 1.10037057600060735398e-05 701717273 74757677 p.rs tuvw
>
> Unfortunately, this number has a non-ASCII character (0x171), as do
> all normalized numbers (except 0.0).
grep can deal, if it is expecting the non-ASCII character.
How many bits are in a double? Two 36-bit words? How many bytes does
that translate to? (The test program may have undesirable 8-bit-isms.)
I'm now using strings like '@@IEEEFP' and 'D__float' instead of just
'ABCDEF'; a corresponding label for the pdp10 would be nice.
zw