From: fairfield@slacvx.slac.stanford.edu
Subject: Re: Help: Any VAX floating point emulation lib. for non-VAX machine
Date: Wed, 31 Aug 1994 17:54:00 GMT [thread overview]
Message-ID: <1994Aug31.095400.1@slacvx.slac.stanford.edu> (raw)
In-Reply-To: CvE5Hn.ApA@world.std.com
In article <CvE5Hn.ApA@world.std.com>,
jg1ifj@world.std.com (Hisa Noguchi) writes:
> Does anyone know of the any VAX floating point emulation library for non-VAX
> system (esp. for PC).
>
> I'm porting a VAX program to PC which using a single precision floating point
> in many places. Because of the FPU differences, VAX and PC give different
> rounding error. It is not negligible for the single precision for this app.
> Unfortunately I can't modify VAX program (out of my control) to use double
> precision to reduce the differences.
>
> Speed is not issue this time, but the target is to get a same (almost) data
> without modifying the VAX program.
>
> It is a common practices to emulate x87 FPU for the x86sx machines. I hope
> somebody has similar library for VAX floating point. Right ?
>
> Any help, suggestion or info. would be appreciated.
Since a VAX F_float (single precision floating point) has the
same precision as an IEEE Single (used by Intel processors), and
since the VAX and IEEE singles have _almost_ the same range, you
shouldn't (in principle) have to do anything. However, the Intel,
especially if you have a math co-processor, is likely to keep more
precision in the intermediate results, and I would expect that is
the difference you are seeing. I believe there is a way to get your
compiler (you didn't say which language) to truncate or round
intermediate results back to single precision. That should
reproduce the VAX results...
-Ken
--
Dr. Kenneth H. Fairfield | Internet: Fairfield@Slac.Stanford.Edu
SLAC, P.O.Box 4349, MS 98 | DECnet: 45537::FAIRFIELD (45537=SLACVX)
Stanford, CA 94309 | Voice: (415) 926-2924 FAX: (415) 926-4335
----------------------------------------------------------------------------
These opinions are mine, not SLAC's, Stanford's, nor the DOE's...
next parent reply other threads:[~1994-08-31 17:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CvE5Hn.ApA@world.std.com>
1994-08-31 17:54 ` fairfield [this message]
1994-09-01 15:18 ` Help: Any VAX floating point emulation lib. for non-VAX machine Steve Lionel
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox