<?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 Thanks Ian. the problem is in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/strange-behaviour-from-64-bit-integer/m-p/1050779#M115148</link>
    <description>&lt;P&gt;Thanks Ian. the problem is fixed!&lt;/P&gt;</description>
    <pubDate>Wed, 14 Jan 2015 21:20:58 GMT</pubDate>
    <dc:creator>Alireza_Forghani</dc:creator>
    <dc:date>2015-01-14T21:20:58Z</dc:date>
    <item>
      <title>strange behaviour from 64-bit integer</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/strange-behaviour-from-64-bit-integer/m-p/1050777#M115146</link>
      <description>&lt;P&gt;I'm seeing a strange behaviour from int64 integer. Following code:&amp;nbsp;&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;    use iso_fortran_env
    implicit none

    integer (int64) :: i
    
    i=2**32-2
    
write (*,*) "i, btest (i,0)" , i, btest (i,0)
    write (*,*) "i, btest (i,31)" , i, btest (i,31)
    write (*,*) "i, btest (i,32)" , i, btest (i,32)
    write (*,*) "i, btest (i,33)" , i, btest (i,33)
    write (*,*) "huge (i)" , huge (i)&lt;/PRE&gt;

&lt;P&gt;returns:&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;i, btest (i,0) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-2 F&lt;BR /&gt;
	&amp;nbsp;i, btest (i,31) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-2 T&lt;BR /&gt;
	&amp;nbsp;i, btest (i,32) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-2 T&lt;BR /&gt;
	&amp;nbsp;i, btest (i,33) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-2 T&lt;BR /&gt;
	&amp;nbsp;huge (i) &amp;nbsp; 9223372036854775807&lt;/P&gt;

&lt;P&gt;which shows that it calculates 2^32-2 as -2. Whereas limit on int64 is &amp;nbsp;&lt;SPAN style="line-height: 19.5120010375977px;"&gt;9223372036854775807 that is way bigger than 2^32!&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="line-height: 19.5120010375977px;"&gt;Wonder if I'm doing something wrong!&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="line-height: 19.5120010375977px;"&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jan 2015 20:46:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/strange-behaviour-from-64-bit-integer/m-p/1050777#M115146</guid>
      <dc:creator>Alireza_Forghani</dc:creator>
      <dc:date>2015-01-14T20:46:00Z</dc:date>
    </item>
    <item>
      <title>The expression on the right</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/strange-behaviour-from-64-bit-integer/m-p/1050778#M115147</link>
      <description>&lt;P&gt;The expression on the right hand side of the assignment to i is not using 64 bit integers.&lt;/P&gt;

&lt;P&gt;Consider the difference between the print statements in the following:&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;  USE, INTRINSIC :: ISO_FORTRAN_ENV, ONLY: INT64
  IMPLICIT NONE
  PRINT *, 2**32-2
  PRINT *, 2_INT64**32-2
END&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jan 2015 20:55:54 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/strange-behaviour-from-64-bit-integer/m-p/1050778#M115147</guid>
      <dc:creator>IanH</dc:creator>
      <dc:date>2015-01-14T20:55:54Z</dc:date>
    </item>
    <item>
      <title>Thanks Ian. the problem is</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/strange-behaviour-from-64-bit-integer/m-p/1050779#M115148</link>
      <description>&lt;P&gt;Thanks Ian. the problem is fixed!&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jan 2015 21:20:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/strange-behaviour-from-64-bit-integer/m-p/1050779#M115148</guid>
      <dc:creator>Alireza_Forghani</dc:creator>
      <dc:date>2015-01-14T21:20:58Z</dc:date>
    </item>
  </channel>
</rss>

