It's probably a case of "different rounding" rather than "correct"
versus incorrect. You must judge whether the differences are
significant in terms of your application. Sorry, I can't help there.
Try it and see. How hard it is depends on how the code
is written. If you use named parameters for the kind values,
it may be very easy. If the compiler has a "all reals are 8 bytes"
switch it may be very easy. Otherwise, you must change
declarations using an editor. If you also have specific
references to intrinsic functions (i.e., dsqrt() instead of sqrt()),
there's more tedium to making the change.
Compile all your source files to object files both compiler options.
Put those objects compiled with optimization in a subdirectory
named "O" or "optimized" or whatever you want. Put those objects
compiled with debugging options in a "g" or "debug" or whatever you
Copy about half the files from the "O" subdirectory (say, those
whose name starts with A through M) into a "test" subdirectory.
Copy the rest of the objects from the "g" directory into the test
subdirectory. Link using the files in the test subdirectory.
Run the program, check the output.
Repeatedly re-link and run the program. when the output is closer
to the debug output,use more files from the "O" directory. When
the output is closer to the release output, use more files from
the "g" subdirectory. Repeat until you can find one file,
or a small set of files, which make the most difference. Those
are the files whose results are changing the most.
Examine the source code for those files. Look for operations,
such as subtractions of quantities very similar in value,
which may be responsible for the differences. Judge whether
the differences are significant for your applications.
Quick description, sorry, I have class tonight. :-)
Purple Sage Computing Solutions, Inc.