[ODE] Record and Playback

Adam D. Moss adam at gimp.org
Tue Jan 27 20:25:05 MST 2004


Marty Rabens wrote:
> Unfortunately, different Intel CPUs and compatibles do NOT always give
> you identical results with floating point operations.

Very interesting.  :)

This looks like a helpful GCC option:

        -ffloat-store
            Do not store floating point variables in registers,
            and inhibit other options that might change whether a
            floating point value is taken from a register or mem-
            ory.

            This option prevents undesirable excess precision on
            machines such as the 68000 where the floating regis-
            ters (of the 68881) keep more precision than a "dou-
            ble" is supposed to have.  Similarly for the x86
            architecture.  For most programs, the excess precision
            does only good, but a few programs rely on the precise
            definition of IEEE floating point.  Use -ffloat-store
            for such programs, after modifying them to store all
            pertinent intermediate computations into variables.

It looks like a panacea for GCC users, except for the horrible
(and ill-defined) constraint that 'all pertinent intermediate
computations' be stored in variables. :(

--Adam
-- 
Adam D. Moss   . ,,^^   adam at gimp.org   http://www.foxbox.org/   co:3
"At this point the rocket becomes engorged with astronauts."


More information about the ODE mailing list