<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Of course it was said much in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Release-Mode-vs-Debug-Mode-Different-value-stored-in-variable/m-p/1171187#M145920</link>
    <description>&lt;P&gt;Of course it was said much more elegantly in the Bible&amp;nbsp;Matthew 7:4 - but the idea is the same.&amp;nbsp;&lt;/P&gt;&lt;P&gt;PS -- Dear All -- this is a weekend test.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 25 Apr 2020 15:42:38 GMT</pubDate>
    <dc:creator>JohnNichols</dc:creator>
    <dc:date>2020-04-25T15:42:38Z</dc:date>
    <item>
      <title>Release Mode vs Debug Mode: Different value stored in variable</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Release-Mode-vs-Debug-Mode-Different-value-stored-in-variable/m-p/1171180#M145913</link>
      <description>&lt;P&gt;I have the following line of code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;lumsum = lumsum*expoq/expot*.000255*base&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;All the variables are double precision and I checked to make sure that all the variables on the left side have EXACTLY the same respective values in Release mode and Debug mode.&amp;nbsp; Before this line of code, if I print the expression on the left side of the equation, BOTH modes print a value of 13.404518622426956.&amp;nbsp; However, under this line of code, if I print "lumsum", Release mode prints a value of 13.404518622426954 while Debug mode prints a value of 13.404518622426956.&lt;/P&gt;&lt;P&gt;Does anyone know why this is happening?&amp;nbsp; Is there a way to fix this so that both modes will ultimately store the exact same value in "lumsum"?&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Apr 2020 19:55:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Release-Mode-vs-Debug-Mode-Different-value-stored-in-variable/m-p/1171180#M145913</guid>
      <dc:creator>Morgan__Kent</dc:creator>
      <dc:date>2020-04-24T19:55:13Z</dc:date>
    </item>
    <item>
      <title>Sorry, I meant to say "on the</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Release-Mode-vs-Debug-Mode-Different-value-stored-in-variable/m-p/1171181#M145914</link>
      <description>&lt;P&gt;Sorry, I meant to say "on the RIGHT side of the equation".&lt;/P&gt;</description>
      <pubDate>Fri, 24 Apr 2020 20:21:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Release-Mode-vs-Debug-Mode-Different-value-stored-in-variable/m-p/1171181#M145914</guid>
      <dc:creator>Morgan__Kent</dc:creator>
      <dc:date>2020-04-24T20:21:58Z</dc:date>
    </item>
    <item>
      <title>I would agree with John above</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Release-Mode-vs-Debug-Mode-Different-value-stored-in-variable/m-p/1171183#M145916</link>
      <description>&lt;P&gt;I would agree with John above. I have always operated under the assumption that the last digit in floating point variables was not to be trusted. When I learned FORTRAN, by Los Alamos Physicist Mentor taught me that last value is dependent on many variables and isn't "real" and depends on CPU and compiler behavior. Hence why they are different with different compiler options.&lt;/P&gt;&lt;P&gt;In application of this principle, when comparing two floating point values for equality, I always ask if the difference is above some threshold, instead of using the == comparison.&lt;/P&gt;
&lt;PRE class="brush:fortran; class-name:dark;"&gt;if(abs(val1-val2) &amp;lt; 1.d-12)then 
&amp;nbsp; they are effectively equal 
endif&lt;/PRE&gt;

&lt;P&gt;instead of:&lt;/P&gt;

&lt;PRE class="brush:fortran; class-name:dark;"&gt;     if(val1==val2)then
       they are equal
     endif&lt;/PRE&gt;

&lt;P&gt;Your values are identical. I never trust the last number in floating point precision. Those are my thoughts, at least.&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Andrew&lt;/P&gt;</description>
      <pubDate>Fri, 24 Apr 2020 21:56:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Release-Mode-vs-Debug-Mode-Different-value-stored-in-variable/m-p/1171183#M145916</guid>
      <dc:creator>Sampson__Andrew</dc:creator>
      <dc:date>2020-04-24T21:56:00Z</dc:date>
    </item>
    <item>
      <title>Quote:Kent, Morgan wrote: Is</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Release-Mode-vs-Debug-Mode-Different-value-stored-in-variable/m-p/1171184#M145917</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Morgan, Kent wrote:&lt;BR /&gt;&amp;nbsp;Is there a way to fix this so that both modes will ultimately store the exact same value in "lumsum"? &lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is nothing to fix. You are looking at two strings that are both approximate decimal representations of internal values that have 53 significant bits, i.e., log&lt;SUB&gt;10&lt;/SUB&gt;(2&lt;SUP&gt;53&lt;/SUP&gt;) = 15.xx decimal digits. The two numbers that you regard as different are identical in the first 16 digits. Only the 17th digits differ.&amp;nbsp;If you viewed the two numbers in their internal representations, they would probably turn out to be identical, so the "difference" that perturbs you may also be an artifact of the binary-to-decimal conversion process(es) used.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Apr 2020 22:59:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Release-Mode-vs-Debug-Mode-Different-value-stored-in-variable/m-p/1171184#M145917</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2020-04-24T22:59:00Z</dc:date>
    </item>
    <item>
      <title>I will also comment that </title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Release-Mode-vs-Debug-Mode-Different-value-stored-in-variable/m-p/1171185#M145918</link>
      <description>&lt;P&gt;I will also comment that&amp;nbsp;.000255 in your expression is single-precision and is not as precise as it would be if you had written&amp;nbsp;.000255D0. Here's the difference in single and double precision:&lt;/P&gt;&lt;P&gt;&amp;nbsp; 0.25499999173916876E-03&lt;BR /&gt;&amp;nbsp; 0.25500000000000002E-03&lt;/P&gt;</description>
      <pubDate>Fri, 24 Apr 2020 23:35:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Release-Mode-vs-Debug-Mode-Different-value-stored-in-variable/m-p/1171185#M145918</guid>
      <dc:creator>Steve_Lionel</dc:creator>
      <dc:date>2020-04-24T23:35:04Z</dc:date>
    </item>
    <item>
      <title>If your number represented</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Release-Mode-vs-Debug-Mode-Different-value-stored-in-variable/m-p/1171182#M145915</link>
      <description>&lt;P&gt;If your number represented the distance from NY to Boston -- the difference is 0.1 nano metres,&amp;nbsp; -- Intel can measure 0.1 nm but it is not really a number of great concern - we have an accelerometer that can measure nm -- but only for less than 1/2000th of a second&lt;/P&gt;&lt;P&gt;These numbers cannot be input into EXCEL at that level of precision&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would say give up.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Apr 2020 21:19:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Release-Mode-vs-Debug-Mode-Different-value-stored-in-variable/m-p/1171182#M145915</guid>
      <dc:creator>JohnNichols</dc:creator>
      <dc:date>2020-04-24T21:19:33Z</dc:date>
    </item>
    <item>
      <title>The difference between these</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Release-Mode-vs-Debug-Mode-Different-value-stored-in-variable/m-p/1171186#M145919</link>
      <description>&lt;P&gt;The difference between these two numbers on the NY to Boston standard is 16541 nm or if the original error represents a standard Roman legion step your error would be 4.1% of the way across the USA.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I suggest you put all constants in one place -accurately&lt;/P&gt;
&lt;PRE class="brush:fortran; class-name:dark;"&gt;Module Base

    INTEGER, PARAMETER :: dp = selected_real_kind(15, 307)

    INTEGER, PARAMETER :: sw = 2                    !   Output file
    INTEGER, PARAMETER :: srA = 15                  !   output.txt file
    INTEGER, PARAMETER :: srB = 16                  !   output.txt file
    INTEGER, PARAMETER :: st = 14
    INTEGER, PARAMETER :: sCAD = 12
    INTEGER, PARAMETER :: sa = 3                    !   Output file
    INTEGER, PARAMETER :: smWrite = 4
    INTEGER, PARAMETER :: si = 1
    Integer, parameter :: slog = 9                  !   Log file
    Integer, parameter :: nta = 200                  !   Log file
    Integer, parameter :: outNode = 63                  !   Log file
    Integer, parameter :: inNode = 0                  !   Log file
    integer, parameter :: nt1 = 2000
    integer, parameter :: mt1 = 2000        !   Number of members
    integer, parameter :: mn1 = 2
    integer, parameter :: ml1 = 3
    integer, parameter :: ml2 = 4
    integer, parameter :: ml30 = 9000
	integer, parameter :: limit = 9000

    REAL (KIND=dp), PARAMETER :: gr = 9.806_DP, pi = 3.14159265_DP  !   Standard parameters
    REAL (KIND=dp), PARAMETER :: delta = 0.001_DP     !   Error number of checking for zero
    REAL (KIND=dp), PARAMETER :: deltafreq = 0.00001_DP     !   Error number of checking for zero
    REAL (KIND=dp), PARAMETER :: ZERO = 0.0_DP
    REAL (KIND=dp), PARAMETER :: ONE = 1.0_DP
    REAL (KIND=dp), PARAMETER :: TWO = 2.0_DP
    REAL (KIND=dp), PARAMETER :: THREE = 3.0_DP
    REAL (KIND=dp), PARAMETER :: THIRTY = 30.0_DP
    REAL (KIND=dp), PARAMETER :: FOUR = 4.0_DP
    REAL (KIND=dp), PARAMETER :: SIX = 6.0_DP
    REAL (KIND=dp), PARAMETER :: TWELVE = 12.0_DP
    REAL (KIND=dp), PARAMETER :: PointFIVE = 0.5_DP
    REAL (KIND=dp), PARAMETER :: PointTWOFIVE = 0.25_DP
    REAL (KIND=dp), PARAMETER :: OneHundred = 1.0_DP
    REAL (KIND=dp), PARAMETER :: DeltaFr = 15000000.0_DP
    REAL (KIND=dp), PARAMETER :: FTR = 1.0_DP
    REAL (KIND=dp), PARAMETER :: FTRA = 100.0_DP
    REAL (KIND=dp), PARAMETER :: SMALLMASS = 0.0001_DP
    REAL (KIND=dp), PARAMETER :: SMALLMASS1 = 0.0000000000000000001_DP
    REAL (KIND=dp), PARAMETER :: SMALLNUMBER = 0.0001_DP
    REAL (KIND=dp), PARAMETER :: SMALLNUMBER1 = 0.0000000061_DP&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 25 Apr 2020 15:35:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Release-Mode-vs-Debug-Mode-Different-value-stored-in-variable/m-p/1171186#M145919</guid>
      <dc:creator>JohnNichols</dc:creator>
      <dc:date>2020-04-25T15:35:55Z</dc:date>
    </item>
    <item>
      <title>Of course it was said much</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Release-Mode-vs-Debug-Mode-Different-value-stored-in-variable/m-p/1171187#M145920</link>
      <description>&lt;P&gt;Of course it was said much more elegantly in the Bible&amp;nbsp;Matthew 7:4 - but the idea is the same.&amp;nbsp;&lt;/P&gt;&lt;P&gt;PS -- Dear All -- this is a weekend test.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 25 Apr 2020 15:42:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Release-Mode-vs-Debug-Mode-Different-value-stored-in-variable/m-p/1171187#M145920</guid>
      <dc:creator>JohnNichols</dc:creator>
      <dc:date>2020-04-25T15:42:38Z</dc:date>
    </item>
  </channel>
</rss>

