[ODE] Record and Playback

Jon Watte hplus-ode at mindcontrol.org
Tue Jan 27 14:51:23 MST 2004


This is similar to the MSVC "improve float consistency" but it's ultimately not the right solution. You can set the FP control word to use 53 or 24 bits of mantissa (counting leading one) which will have the same effect. However, the problem is that different CPUs come up with different results, even within these well-defined mantissas.

Cheers,

			/ h+


-----Original Message-----
From: ode-bounces at q12.org [mailto:ode-bounces at q12.org]On Behalf Of Adam
D. Moss
Sent: Tuesday, January 27, 2004 12:25 PM
To: ode
Subject: Re: [ODE] Record and Playback


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."
_______________________________________________
ODE mailing list
ODE at q12.org
http://q12.org/mailman/listinfo/ode




More information about the ODE mailing list