>
>
> Dave Rivers wrote:
>
> >That is, of course one of the issues. The i386 IEEE implementation
> >is not the same as the mainframe, particularly when two variables
> >are loaded into registers and arithmetic is applied. The result
> >will be different. So, one set of "IEEE" arithmetic on a PC
> >can get very different answers than the same arithmetic on a 390.
> >I don't know how gcc handles this.
>
> Basically, by not using the host's native floating point facilities
> at all. Instead, all floating point use at compile time is done by
> a floating point emulation library that can be tuned to exactly
> simulate the target's native floating point format and precision.
>
> This is necessary both for things like compile-time folding of
> floating point constants, to make sure we get the same result
> as we'd get had we executed the computation explicitly on the
> target machine, and for things like the use of floating point
> variables internally to the compiler (e.g. for branch probabilities)
> where different rounding could cause different optimization
> decisions and thus different emitted code in a cross vs. a
> native compilation.
Yes - it sounds *very* familiar! :-)
- Dave Rivers -
--
[EMAIL PROTECTED] Work: (919) 676-0847
Get your mainframe programming tools at http://www.dignus.com