Software Archive
Read-only legacy content
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
17060 Discussions

Re: debug vs release

sabalan
New Contributor I
322 Views
The following have helpt me to elliminate differences between debug and release results, and may help you too:
1- Use IMPLICIT NONE and declare all of your variables;
2- Initialize all variables, especially arrays;
3- Do not mix up REAL with REAL*8 and INTEGER in the same calculation;
4- Do use D (for double precision) with your constants if you declare the variables as double precision (e.g. X=0D0, Y=1D0 rather than X=0, Y=1 -- if X and Y are REAL*8);
5- Be carefull with logical results of such comparisons as IF(X-Y == 0D0) THEN... This may behave different for debug vs release if X and Y are calculated values;
6- Read Dave Eklunds 'The Perils of Real Numbers' in CVF Newsletter issues 8, 9 and 10.

Regards,
Sabalan.
0 Kudos
0 Replies
Reply