[ODE] Reseting World Params

Martin C. Martin martin at metahuman.org
Mon Apr 14 16:13:02 2003


Rob Leclerc wrote:
> 
> Again, I am setting precision pretty
> high for output and I don't think this is the problem.

How high is "pretty high"?  DBL_DIG + 2?  More?

If you get desperate, you can try compiling with -ffloat-store (gcc) or
"Improve Floating Point Consistency" (MSVC).

> Any other guesses?

Try printing out values of as many (relevant) variables you can think of
at every step of the simulation: NN inputs, hidden layers, outputs,
positions & velocities of all body parts, applied forces/torques, etc. 
Store them all to a file, and use diff to find out where they first
differ.  To be doubly sure, you can print out floating point values this
way:

   float f;
   double d;
   ...
   cout << *(int *)&f << endl;
   cout << *(int64 *)&d << endl;

You'll need to define an appropriate 64 bit int type, but both gcc and
MSVC support it.

- Martin