<?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: Looking for fast exponential function in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/Looking-for-fast-exponential-function/m-p/956214#M20883</link>
    <description>The algorithm isn't slow, but it is a routine.  The compiler can generate inline instructions for this operation if the Math Library:Fast option is enabled.  Turning on argument checking makes no difference here.  &lt;BR /&gt;&lt;BR /&gt;FIIfexp is called when Check:Power is enabled, FIfexp if that is disabled.  Check:Power disallows 0**0.  &lt;BR /&gt;&lt;BR /&gt;Steve</description>
    <pubDate>Sun, 24 Jun 2001 09:42:05 GMT</pubDate>
    <dc:creator>Steven_L_Intel1</dc:creator>
    <dc:date>2001-06-24T09:42:05Z</dc:date>
    <item>
      <title>Looking for fast exponential function</title>
      <link>https://community.intel.com/t5/Software-Archive/Looking-for-fast-exponential-function/m-p/956213#M20882</link>
      <description>Hi, all, &lt;BR /&gt;I have been using profile to check function time. The following is what I got. It shows my program calls exponential function a lot. I am wondering if there is any documentation about this function. If the algorithm is slow I would try to find a fast version. Also I don't understand what's the difference between FIexp and FIIfexp. FIexp shows up if I turn the argument checking on. One other thing is why my main program shows up twice in the profile(first line and second line). If the first two lines represent the same thing, then the total function time would be less than 100%.  I am really puzzled. Can someone enlighten me? Thanks a lot. &lt;BR /&gt; &lt;BR /&gt;NP &lt;BR /&gt; &lt;BR /&gt;        Func          Func+Child           Hit &lt;BR /&gt;        Time   %         Time      %      Count  Function &lt;BR /&gt;--------------------------------------------------------- &lt;BR /&gt;   17218.950  22.4    59671.473  77.6        1 _MAIN$VFID03@0 (vfid03.obj) &lt;BR /&gt;   17218.950  22.4    59671.473  77.6        1 _MAIN__ (vfid03.obj) &lt;BR /&gt;   12131.031  15.8    12131.031  15.8 28595273 __FIexp (intrin.obj) &lt;BR /&gt;   10852.623  14.1    10852.623  14.1 26621304 __FIIfexp_ (intrini.obj) &lt;BR /&gt;   10465.588  13.6    12024.093  15.6   110904 _DSVRGP@16 (dsvrgp.obj) &lt;BR /&gt;    7056.773   9.2    19080.866  24.8   110904 _INTERP1@24 (interp1.obj) &lt;BR /&gt;    1359.777   1.8     1359.777   1.8   110904 _DCOPY@20 (dcopy.obj) &lt;BR /&gt;     217.451   0.3     1104.492   1.4        2 _DEBTPRICE@104 (debtprice.obj)</description>
      <pubDate>Sun, 24 Jun 2001 09:12:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Looking-for-fast-exponential-function/m-p/956213#M20882</guid>
      <dc:creator>Intel_C_Intel</dc:creator>
      <dc:date>2001-06-24T09:12:45Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for fast exponential function</title>
      <link>https://community.intel.com/t5/Software-Archive/Looking-for-fast-exponential-function/m-p/956214#M20883</link>
      <description>The algorithm isn't slow, but it is a routine.  The compiler can generate inline instructions for this operation if the Math Library:Fast option is enabled.  Turning on argument checking makes no difference here.  &lt;BR /&gt;&lt;BR /&gt;FIIfexp is called when Check:Power is enabled, FIfexp if that is disabled.  Check:Power disallows 0**0.  &lt;BR /&gt;&lt;BR /&gt;Steve</description>
      <pubDate>Sun, 24 Jun 2001 09:42:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Looking-for-fast-exponential-function/m-p/956214#M20883</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2001-06-24T09:42:05Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for fast exponential function</title>
      <link>https://community.intel.com/t5/Software-Archive/Looking-for-fast-exponential-function/m-p/956215#M20884</link>
      <description>The in-lined code obtained with /fast is the best you can do on processors other than P4, unless you have a special case.  For P4, there are methods involving sse code which are faster, while the internal intrinsics copied from earlier processors are not so competitive.</description>
      <pubDate>Tue, 26 Jun 2001 02:15:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Looking-for-fast-exponential-function/m-p/956215#M20884</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2001-06-26T02:15:05Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for fast exponential function</title>
      <link>https://community.intel.com/t5/Software-Archive/Looking-for-fast-exponential-function/m-p/956216#M20885</link>
      <description>If you want to speed things up you can do several things: &lt;BR /&gt;a)Improve your code to call EXP less often&lt;P&gt; &lt;BR /&gt;b)sacrifice accuracy and use a faster routine.&lt;/P&gt;&lt;P&gt; &lt;BR /&gt;&lt;/P&gt; &lt;BR /&gt;For example, if your arguments are integer multiples of a real number X say, &lt;BR /&gt; &lt;BR /&gt;save EXP(X) (or EXP(-X) ) in a local variable and then raise it to the required integer power. &lt;BR /&gt;Alternatively, use the REAL*4 version instead of the REAL*8. &lt;BR /&gt;If you require complex arguments, then evaluate the real and imaginary parts separately. &lt;BR /&gt;&lt;P&gt;&lt;/P&gt; &lt;BR /&gt;What about precision?  &lt;BR /&gt;Since EXP(X) = 10**(X*log10(e)), X*log10(e) will have integer and a fractional part. You therefore only need to evaluate 10**(the fractional part). If you can justify errors on the order of 10**-5 or so, you can program your own &lt;BR /&gt;polynomial approximation to 10**X for 0&lt;X&gt;&amp;lt;1 (see for example &lt;BR /&gt;Hasting's formulae in Abramowitz and Steguns 'Handbook of Mathematical Functions'. &lt;BR /&gt;&lt;P&gt;&lt;/P&gt; &lt;BR /&gt;regards&lt;P&gt; &lt;BR /&gt;Tony Richards&lt;/P&gt;&lt;/X&gt;</description>
      <pubDate>Tue, 26 Jun 2001 20:44:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Looking-for-fast-exponential-function/m-p/956216#M20885</guid>
      <dc:creator>isn-removed200637</dc:creator>
      <dc:date>2001-06-26T20:44:01Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for fast exponential function</title>
      <link>https://community.intel.com/t5/Software-Archive/Looking-for-fast-exponential-function/m-p/956217#M20886</link>
      <description>1. Thank tprince and Tony for your advice. Like what Tony said, I improved my code so EXP is called less often. Now I can live with its speed. However, I notice in the documentation it says for Alpha systems, if you specify /fast, a tuned routine for EXP will be used. That's the reason why I am looking for the similar thing for x86 systems. &lt;BR /&gt; &lt;BR /&gt;2. Thank Steve for your prompt reply, but what you said is very wrong. First, exponential function is defined on the whole complex plane. /check:power will never affect this function.  Second, 0**0 is not an exp function. Third,  /math_library:fast or /math_library:check does make a difference. &lt;BR /&gt; &lt;BR /&gt;this is part of the profile with /math_library:fast &lt;BR /&gt; &lt;BR /&gt;Func Time %   Func+Child Time %   Hit Count  Function &lt;BR /&gt; &lt;BR /&gt;924.326    8.0  924.326              8.0  1798503  __FIIfexp_ (intrini.obj) &lt;BR /&gt; &lt;BR /&gt;this is part of the profile with /math_library:check &lt;BR /&gt; &lt;BR /&gt;Func Time %    Func+Child Time %    Hit Count  Function &lt;BR /&gt; &lt;BR /&gt;1436.312  10.9 1436.312           10.9  2640051   __FIexp (intrin.obj) &lt;BR /&gt; &lt;BR /&gt;1030.355   7.8  1030.355           7.8   1798503    __FIIfexp_ (intrini.obj) &lt;BR /&gt; &lt;BR /&gt;Please look at the difference carefully. I hope you can tell me what &lt;BR /&gt;FIexp did in the second case. &lt;BR /&gt; &lt;BR /&gt;(I've pointed out in another post that there's a possible bug in /check:power) &lt;BR /&gt; &lt;BR /&gt;3. I am still puzzled with the first two lines of my profiling result. I think they represent the same thing. But why should they appear twice? &lt;BR /&gt; &lt;BR /&gt;Func Time %    Func+Child Time %  Hit Count   Function &lt;BR /&gt; &lt;BR /&gt;5301.114  45.8 6251.427           54.0   1           _MAIN$VFID03@0 (vfid03.obj) &lt;BR /&gt; &lt;BR /&gt;5301.114  45.8 6251.427           54.0   1           _MAIN__ (vfid03.obj) &lt;BR /&gt; &lt;BR /&gt;924.326    8.0     924.326            8.0  1798503  __FIIfexp_ (intrini.obj) &lt;BR /&gt; &lt;BR /&gt;4. I got the following link warning: &lt;BR /&gt;vfid03.exe : warning LNK4084: total image size 752377856 exceeds max(268435456); image may not run &lt;BR /&gt;I am wondering if I can lift the total image size limit of 256MB. &lt;BR /&gt; &lt;BR /&gt;Sorry for all the questions. Your help will be greatly appreciated. &lt;BR /&gt; &lt;BR /&gt;NP</description>
      <pubDate>Wed, 27 Jun 2001 19:24:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Looking-for-fast-exponential-function/m-p/956217#M20886</guid>
      <dc:creator>Intel_C_Intel</dc:creator>
      <dc:date>2001-06-27T19:24:26Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for fast exponential function</title>
      <link>https://community.intel.com/t5/Software-Archive/Looking-for-fast-exponential-function/m-p/956218#M20887</link>
      <description>hi, I have one question.  my code is below, &lt;BR /&gt;and , after compileing, I get a warning, "Debug/calsen.exe : warning LNK4084: total image size 274325504 exceeds max (268435456); image may not run" &lt;BR /&gt; &lt;BR /&gt;what is total image size?And i 'd like to make executable file in this code..... &lt;BR /&gt;thank you  &lt;BR /&gt; &lt;BR /&gt;C--------------------------------------------------------- &lt;BR /&gt;C              CALCULATE SEN &lt;BR /&gt;C----------------------------------------------------------- &lt;BR /&gt;      PROGRAM CALSEN &lt;BR /&gt;      integer  i,j,KELN,KDOF,KNOF,KRN,KNON,KRER,NM &lt;BR /&gt;	REAL  sk(5000,5000) &lt;BR /&gt;      REAL sm(5000,5000) &lt;BR /&gt;      REAL db,SEIG,SEN2,SENS &lt;BR /&gt;      REAL sivec(4500) &lt;BR /&gt;	REAL sivec2(4500) &lt;BR /&gt;      integer nod(5000) &lt;BR /&gt;c      DIMENSION NOD(1) &lt;BR /&gt; &lt;BR /&gt;      OPEN(5001,FILE='k.txt',status='OLD') &lt;BR /&gt;      OPEN(5003,FILE='m.txt',status='OLD') &lt;BR /&gt;      OPEN(5002,FILE='k2.txt',status='OLD') &lt;BR /&gt;      OPEN(5004,FILE='m2.txt',status='OLD') &lt;BR /&gt;      OPEN(2005,FILE='info.txt',status='OLD') &lt;BR /&gt;      OPEN(2003,FILE='TEST.txt',status='OLD') &lt;BR /&gt;      OPEN(2002,FILE='info2.txt',status='OLD') &lt;BR /&gt;      OPEN(2001,FILE='EIG.txt',status='OLD') &lt;BR /&gt;      OPEN(2004,FILE='EIGV.txt',status='OLD') &lt;BR /&gt;	open(7001,file='michin.txt') &lt;BR /&gt;	open(7002,file='michin1.txt') &lt;BR /&gt;	open(999,file='michin2.txt') &lt;BR /&gt;	open(998,file='NOchin.txt') &lt;BR /&gt; &lt;BR /&gt;C------------------------------------------------------------ &lt;BR /&gt; &lt;BR /&gt; 	READ(2005,10)KELN,KDOF,KNOF,KRN,KNON,DB &lt;BR /&gt;10	FORMAT(1X,5(I7),E20.12) &lt;BR /&gt; 	READ(2002,20)NM &lt;BR /&gt;20	FORMAT(1X,I5) &lt;BR /&gt; &lt;BR /&gt;	DO I=1,KNON*KELN &lt;BR /&gt;	READ(2003,100)NOD(I) &lt;BR /&gt;      END DO &lt;BR /&gt;100	FORMAT(1X,I5) &lt;BR /&gt; &lt;BR /&gt;	KRER=5001 &lt;BR /&gt;	CALL SEN(KRER,DB,KELN,KDOF,KNOF,KNON,NOD,SK)  &lt;BR /&gt;	KRER=5003 &lt;BR /&gt;	CALL SEN(KRER,DB,KELN,KDOF,KNOF,KNON,NOD,SM)  &lt;BR /&gt;       &lt;BR /&gt;	do i=1,nm*knof &lt;BR /&gt;	write(7001,300)sk(i,1)				   &lt;BR /&gt;	end do	 &lt;BR /&gt;	do i=1,nm*knof &lt;BR /&gt;	write(7002,300)sk(1,i) &lt;BR /&gt;	end do	 &lt;BR /&gt; &lt;BR /&gt;	DO I=1,NM*KNOF &lt;BR /&gt;	READ(2001,300)SIVEC(I) &lt;BR /&gt;300	FORMAT(1X,E20.12) &lt;BR /&gt;	END DO &lt;BR /&gt; &lt;BR /&gt;	READ(2004,300)SEIG &lt;BR /&gt; &lt;BR /&gt;	DO I=1,NM*KNOF &lt;BR /&gt;	DO J=1,NM*KNOF &lt;BR /&gt;	SK(I,J)=SK(I,J)-SEIG*SM(I,J) &lt;BR /&gt;	END DO &lt;BR /&gt;	END DO	 &lt;BR /&gt; &lt;BR /&gt;	 &lt;BR /&gt;	DO I=1,NM*KNOF &lt;BR /&gt;	DO J=1,NM*KNOF &lt;BR /&gt;	SEN2=SIVEC(J)*SK(J,I)+SEN2	 &lt;BR /&gt;	END DO &lt;BR /&gt;	SIVEC2(I)=SEN2 &lt;BR /&gt;      SEN2=0 &lt;BR /&gt;	END DO	 &lt;BR /&gt; &lt;BR /&gt;	SENS=0 &lt;BR /&gt;	DO I=1,NM*KNOF &lt;BR /&gt;	SENS=SIVEC2(I)*SIVEC(I)+SENS	 &lt;BR /&gt;	END DO &lt;BR /&gt; &lt;BR /&gt;      OPEN(7000,FILE='SEN.TXT') &lt;BR /&gt;	WRITE(7000,300)SENS &lt;BR /&gt; &lt;BR /&gt;      STOP &lt;BR /&gt;	END &lt;BR /&gt; &lt;BR /&gt;C------------------------------------------------------------- &lt;BR /&gt;      SUBROUTINE SEN(KRER,DB,KELN,KDOF,KNOF,KNON,NOD,SK1)  &lt;BR /&gt;C------------------------------------------------------------- &lt;BR /&gt;c	IMPLICIT DOUBLE PRECISION(A-H,O-Z) &lt;BR /&gt;C double precision       &lt;BR /&gt;	REAL  sk1(5000,5000) &lt;BR /&gt;      REAL  sm(5000,5000) &lt;BR /&gt;      REAL ak(100) &lt;BR /&gt;     REAL ak2(100) &lt;BR /&gt;      integer nod(5000) &lt;BR /&gt;	INTEGER KELN,KNON,KNOF,KDOF,L,M,K,K2,J2 &lt;BR /&gt;	M=0 &lt;BR /&gt;	L=0 &lt;BR /&gt;200	FORMAT(1X,E20.12) &lt;BR /&gt;c201	FORMAT(1X,2(E20.12)) &lt;BR /&gt; &lt;BR /&gt;	DO N=1,KELN &lt;BR /&gt; &lt;BR /&gt;	DO K=1,KNON &lt;BR /&gt;	DO K2=1,KNOF &lt;BR /&gt; &lt;BR /&gt;	   DO I=1,KDOF &lt;BR /&gt;	   READ(KRER,200)AK(I) &lt;BR /&gt;	   READ(KRER+1,200)AK2(I) &lt;BR /&gt;	   END DO &lt;BR /&gt;	L=0 &lt;BR /&gt;	DO J=1,KNON &lt;BR /&gt;	DO J2=0,KNOF-1 &lt;BR /&gt;      SK1((NOD(M+K)-1)*KNOF+K2,((NOD(M+J)-1)*KNOF+1)+J2) &lt;BR /&gt;     *=((AK2(L+J2+1)-AK(L+J2+1))/DB)+ &lt;BR /&gt;     *SK1((NOD(M+K)-1)*KNOF+K2,((NOD(M+J)-1)*KNOF+1)+J2) &lt;BR /&gt; &lt;BR /&gt;	END DO &lt;BR /&gt;	L=L+KNOF &lt;BR /&gt;	END DO &lt;BR /&gt; &lt;BR /&gt;	END DO &lt;BR /&gt;	END DO &lt;BR /&gt;	M=M+KNON &lt;BR /&gt;	END DO &lt;BR /&gt;c-------------------------------------------------------------- &lt;BR /&gt;	RE
TURN &lt;BR /&gt;	STOP &lt;BR /&gt;	END &lt;BR /&gt;C-----------------------------------------------------------------</description>
      <pubDate>Sun, 12 Aug 2001 10:32:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Looking-for-fast-exponential-function/m-p/956218#M20887</guid>
      <dc:creator>Intel_C_Intel</dc:creator>
      <dc:date>2001-08-12T10:32:40Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for fast exponential function</title>
      <link>https://community.intel.com/t5/Software-Archive/Looking-for-fast-exponential-function/m-p/956219#M20888</link>
      <description>See &lt;A href="http://www.compaq.com/fortran/kb/q1019.html" target="_blank"&gt;this Knowledge Base article&lt;/A&gt;.&lt;BR /&gt;&lt;BR /&gt;Steve</description>
      <pubDate>Sun, 12 Aug 2001 10:56:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Looking-for-fast-exponential-function/m-p/956219#M20888</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2001-08-12T10:56:00Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for fast exponential function</title>
      <link>https://community.intel.com/t5/Software-Archive/Looking-for-fast-exponential-function/m-p/956220#M20889</link>
      <description>In my experience it is much faster to compute Y=EXP(P*LOG(X)) than Y=X**P; try it! &lt;BR /&gt; &lt;BR /&gt;Best wishes, Edmund Dunlop</description>
      <pubDate>Tue, 14 Aug 2001 22:15:37 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Looking-for-fast-exponential-function/m-p/956220#M20889</guid>
      <dc:creator>edunlop</dc:creator>
      <dc:date>2001-08-14T22:15:37Z</dc:date>
    </item>
  </channel>
</rss>

