Port-vax archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

infinity and beyond



Hello,

With respect to the binary representation of infinity on the vax:
Currently in <machine/float.h>
        __INFINITY = 1.0e+39F 

or in libc/arch/vax/gen/infinity.c:

const union __double_u __infinity =
        { { 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff } };

The first is problematic with gcc-4.5 because it detects the oveflow
and refuses to do the assignment. We could use the second but it looks
like the wrong binary representation to me.

I found:
http://h71000.www7.hp.com/doc/82final/6443/6443pro_027.html

which describes that DEC^WCompaq^WHP fortran uses 0 mantissa all 1's
exponent to represent infinity. Should we switch to that?

Either way, I think that programs expect to be able to do:

        double x = INFINITY;

and that is currently broken on the vax.

christos


Home | Main Index | Thread Index | Old Index