This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: exotic floating point formats test


"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    ..(. ."..

> 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).

-- 
http://lars.nocrew.org/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]