Subject: Re: IEEE FP on VAX? [was Re: Trouble by compiling/configuring
To: None <>
From: Matt Thomas <>
List: port-vax
Date: 01/02/2001 10:33:01
At 01:02 PM 1/2/2001 -0500, Brian Chase wrote:
>On Mon, 1 Jan 2001, Sebastian Marius Kirsch wrote:
> > On Sun, Dec 31, 2000 at 03:49:19PM +0100, Christophe wrote:
> > > Perl5 configuration on pkgsrc got an error with the ieeefp.h 
> include-file,
> > > there is no /usr/include/machine/ieeefp.h.
> > Since ieeefp.h tries to include a machine-specific header file, and
> > there isn't one for the VAX since it doesn't have IEEE floats, I simply
> > deleted ieeefp.h. Worked fine.
> >
> > I'm still trying to build GNU Emacs without float support, though ...
>How would one go about doing an IEEE FP emulator for the VAX?  Obviously
>this wouldn't be ideal in terms of performance but it would be useful.
>Lots of FP dependent software assumes that you're using IEEE FP.  IMHO
>this is more of a flaw in the software that makes that assumption.

A lot of FP dependent software is wrong.  Considering how much engineering
was done using VAX Fortran, I don't think you can say VAX FP is bad.  It's
different from IEEE FP.  Most software never uses the IEEE rounding modes
so it's not really an issue.

>Maybe emulation is the wrong approach.  Would it be better to provide a
>compile time library for programs wich need IEEE FP support?

It would be very slow.

>Given that we already have VAX FP instructions, I think that VAX based
>IEEE support could be a lot faster in some cases than a purely integer
>math based version.  You'd have to transform IEEE data into the VAX
>format, run a VAX FP instruction, and then transform the result back into
>IEEE.  I know it's more difficult than just that, but you should be able
>leverage the existing FP support.

VAX FP does many thing differently than IEEE FP so you can't use it to
emulate IEEE FP.  I have been thinking about adding G-Float libraries
when I switch to ELF.  (I encode the executable float type in the ELF
header so you can tell the difference and ld complain if you mix in
the wrong types).  Note that the G float is closer in precision and
range to IEEE FP double format.

Matt Thomas               Internet:
3am Software Foundry      WWW URL:
Cupertino, CA             Disclaimer: I avow all knowledge of this message