<?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 Re: Intel Function Sample in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-Function-Sample/m-p/1417929#M162943</link>
    <description>&lt;P&gt;Here is the current link to the page in question: &lt;A href="https://www.intel.com/content/www/us/en/develop/documentation/fortran-compiler-oneapi-dev-guide-and-reference/top/language-reference/a-to-z-reference/e-to-f/function.html" target="_self"&gt;FUNCTION&lt;/A&gt; . A plot of the function can be viewed using this &lt;A href="https://www.wolframalpha.com/input?i=plot+cosh%28x%29%2Bcos%28x%29" target="_self"&gt;Wolfram Alpha link&lt;/A&gt;.&lt;/P&gt;</description>
    <pubDate>Wed, 28 Sep 2022 10:14:45 GMT</pubDate>
    <dc:creator>mecej4</dc:creator>
    <dc:date>2022-09-28T10:14:45Z</dc:date>
    <item>
      <title>Intel Function Sample</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-Function-Sample/m-p/1400957#M162084</link>
      <description>&lt;P&gt;I was looking at your function documentation today.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="fortran"&gt;
  FUNCTION ROOT(A)
    X  = 1.0
    DO
      EX = EXP(X)
      EMINX = 1./EX
      ROOT  = X - ((EX+EMINX)*.5+COS(X)-A)/((EX-EMINX)*.5-SIN(X))
      IF (ABS((X-ROOT)/ROOT) .LT. 1E-6) RETURN
      X  = ROOT
    END DO
  END&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Unless I am mistaken and I ran it a few times, A &amp;gt; 2 for X to exist.&amp;nbsp; &amp;nbsp;It just goes in an endless loop with A &amp;lt; 2 and runs into nan, but does not stop.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;cosh(x) according to Wikipedia has a minimum of 1 at X = 0 and it increases faster than cos(x) decreases.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;
  FUNCTION ROOT(A)
if(A &amp;lt; 2.000) then 
stop  "A has to be greater than 2"
endif
    X  = 1.0
    DO
      EX = EXP(X)
      EMINX = 1./EX
      ROOT  = X - ((EX+EMINX)*.5+COS(X)-A)/((EX-EMINX)*.5-SIN(X))
      IF (ABS((X-ROOT)/ROOT) .LT. 1E-6) RETURN
      X  = ROOT
    END DO
  END&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Just a thought.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 17 Jul 2022 14:14:06 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-Function-Sample/m-p/1400957#M162084</guid>
      <dc:creator>JohnNichols</dc:creator>
      <dc:date>2022-07-17T14:14:06Z</dc:date>
    </item>
    <item>
      <title>Re:Intel Function Sample</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-Function-Sample/m-p/1403179#M162189</link>
      <description>&lt;P&gt;&lt;a href="https://community.intel.com/t5/user/viewprofilepage/user-id/89041"&gt;@JohnNichols&lt;/a&gt;, it took some digging, but we found the example you pointed out! I filed a bug report on the Fortran DGR (Developer Guide and Reference), DOC-10256. I added an IF/THEN/ELSE/ENDIF.&lt;/P&gt;&lt;P&gt;Thanks for reporting this.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 25 Jul 2022 16:43:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-Function-Sample/m-p/1403179#M162189</guid>
      <dc:creator>Barbara_P_Intel</dc:creator>
      <dc:date>2022-07-25T16:43:04Z</dc:date>
    </item>
    <item>
      <title>Re: Re:Intel Function Sample</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-Function-Sample/m-p/1403190#M162190</link>
      <description>&lt;P&gt;&lt;a href="https://community.intel.com/t5/user/viewprofilepage/user-id/44501"&gt;@Barbara_P_Intel&lt;/a&gt;&amp;nbsp;, thanks.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was using the function as a sample and the blasted thing disappeared to infinity and beyond.&amp;nbsp; So it took a few minutes to track down the problem.&amp;nbsp; The issue is the interesting shape of the cosh function.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am sorry I will provide a link in the future.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jul 2022 17:25:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-Function-Sample/m-p/1403190#M162190</guid>
      <dc:creator>JohnNichols</dc:creator>
      <dc:date>2022-07-25T17:25:23Z</dc:date>
    </item>
    <item>
      <title>Re:Intel Function Sample</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-Function-Sample/m-p/1417750#M162938</link>
      <description>&lt;P&gt;A new Fortran Developer Guide and Reference was recently published. The error in the example code is fixed.&lt;/P&gt;&lt;P&gt;The tech writer says, "Thank you for pointing this out!"&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 27 Sep 2022 19:36:46 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-Function-Sample/m-p/1417750#M162938</guid>
      <dc:creator>Barbara_P_Intel</dc:creator>
      <dc:date>2022-09-27T19:36:46Z</dc:date>
    </item>
    <item>
      <title>Re: Intel Function Sample</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-Function-Sample/m-p/1417929#M162943</link>
      <description>&lt;P&gt;Here is the current link to the page in question: &lt;A href="https://www.intel.com/content/www/us/en/develop/documentation/fortran-compiler-oneapi-dev-guide-and-reference/top/language-reference/a-to-z-reference/e-to-f/function.html" target="_self"&gt;FUNCTION&lt;/A&gt; . A plot of the function can be viewed using this &lt;A href="https://www.wolframalpha.com/input?i=plot+cosh%28x%29%2Bcos%28x%29" target="_self"&gt;Wolfram Alpha link&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Sep 2022 10:14:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-Function-Sample/m-p/1417929#M162943</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2022-09-28T10:14:45Z</dc:date>
    </item>
    <item>
      <title>Re: Intel Function Sample</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-Function-Sample/m-p/1417964#M162948</link>
      <description>&lt;P&gt;mecej4 (or Steve),&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there a way for a UDT contained procedure function to be used on the LHS of = that returns a reference to an array as opposed to a scalar? And which subsequently can be indexed;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; obj%func(i) = ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;IOW (i) is not an argument to the function but rather is an index into the returned array.&lt;/P&gt;
&lt;P&gt;Note, if instead, the function is written to accept the index as an argument and return a reference to a cell within the (hidden) array, this works.&lt;/P&gt;
&lt;P&gt;Jim Dempsey&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;edit:&lt;/P&gt;
&lt;P&gt;block&lt;/P&gt;
&lt;P&gt;&amp;nbsp; real, pointer :: temp&lt;/P&gt;
&lt;P&gt;&amp;nbsp; temp =&amp;gt; obj%func&lt;/P&gt;
&lt;P&gt;&amp;nbsp; temp(i) = ...&lt;/P&gt;
&lt;P&gt;end block&lt;/P&gt;
&lt;P&gt;Works, but is not elegant.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jim&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Sep 2022 13:22:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-Function-Sample/m-p/1417964#M162948</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2022-09-28T13:22:02Z</dc:date>
    </item>
    <item>
      <title>Re: Intel Function Sample</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-Function-Sample/m-p/1417982#M162951</link>
      <description>&lt;P&gt;No, you can't index a function reference.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Sep 2022 14:54:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-Function-Sample/m-p/1417982#M162951</guid>
      <dc:creator>Steve_Lionel</dc:creator>
      <dc:date>2022-09-28T14:54:24Z</dc:date>
    </item>
    <item>
      <title>Re: Re:Intel Function Sample</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-Function-Sample/m-p/1418668#M162976</link>
      <description>&lt;P&gt;Barbara:&lt;/P&gt;
&lt;P&gt;Thank the tech writer for their kind words.&amp;nbsp; I showed the comment to my 15 year old daughter and she said even Santa is useful once a year.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;She has a way with words, she did not get it from me.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note this morning on VS 2019 - please upgrade as you only get security fixes.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;John&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Sep 2022 14:09:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-Function-Sample/m-p/1418668#M162976</guid>
      <dc:creator>JohnNichols</dc:creator>
      <dc:date>2022-09-30T14:09:26Z</dc:date>
    </item>
  </channel>
</rss>

