Port-vax archive

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

infinity and beyond


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:

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.


Home | Main Index | Thread Index | Old Index