Craig A. Berry [mailto:[EMAIL PROTECTED]] writes:
> There are various fix-ups here that help with VAX builds, non-IEEE 
> float format Alpha builds, older versions of DEC C, and downright 
> ancient versions of VMS.  Thanks to Brian Tillman and Henry Frystak 
> for testing and reporting problems.  Everything here is VMS-specific. 
> There are some remaining test failures, particularly related to VAX 
> D_FLOAT doubles, but this should at least get us a clean build on any 
> VMS version released in the last 10-12 years.
> 
> The pp_pack.c bit essentially steals Paul's VOS code for packing 
> floats and doubles but we don't have the same constants he does 
> (_float_constants, _double_constants) so  I couldn't simply share the 
> same code.

No problem. Have at it. Glad to help.

But... your code and my code don't quite do the same thing... my version
converts an out-of-range value to + or -infinity.  Your version converts the
out-of-range value to + or -(FLT|DBL)_MAX.  IIRC, I picked infinity because
that is how Solaris and Linux and other Unix OSes seemed to convert
out-of-range values.  Sadly, the standard C header float.h does not specify
a macro for + or - infinity, which is why I had to reach behind the scenes
to pick up a hidden C runtime constant.  (I don't think Standard C even
specifies IEEE floating-point, for that matter).  IEEE floating-point does
have well-defined binary values for the infinities, however, so I suppose I
could have used unions to achieve the same end, only in an
implementation-independent manner.

However, doesn't VMS have both IEEE and non-IEEE floating-point formats?  Do
either of them support infinities?  Should we try to collaborate on finding
a common solution here?

Thanks
PG

Reply via email to