Port-vax archive

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

Re: (nearly) everything works on a Vaxstation 4000/90



>>  double d = 1e50; 
>> is translated to:
>>  movd $0d+Inf,-12(%fp)

> 1e50 should definitely fit into a double... Something is fishy here.
> I suspect the compiler.

You're probably thinking IEEE.  This is VAX floating point; D-floats,
like F-floats, range from, approximately, .29e-38 to 1.7e38.  1e50 is
quite definitely out of range.  (D-float is just like F-float but with
more mantissa bits, in contrast to the way IEEE double extends the
exponent as well as the mantissa.  There is a 64-bit VAX floating-point
type, G-float, with more exponent bits, and a 128-bit type, H-float,
with even more, but the "movd" indicates that D-float is in use here.)

Furthermore, anything that tries to generate an infinity under any
circumstances when building for a VAX is prima facie broken.

/~\ The ASCII                             Mouse
\ / Ribbon Campaign
 X  Against HTML                mouse%rodents-montreal.org@localhost
/ \ Email!           7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B


Home | Main Index | Thread Index | Old Index