topic /Qfast-transcendentals in IntelĀ® Fortran Compiler
https://community.intel.com/t5/Intel-Fortran-Compiler/Qfast-transcendentals/m-p/1106682#M128200
<P>Hi,</P>
<P>I have a module where I need to evaluate a lot of exp functions inside a big loop. Inside this loop I don't need full precision and the /Qfast-transcendentals compiler option is tempting to apply. However other places in the module I need full precision. Is there a way to specify exactly where to use the fast algorithm?</P>
<P><SPAN style="font-size: 1em;">Is it possible to apply the fast versions by a proper use statement as a replacement for the compiler option?</SPAN></P>
<PRE class="brush:fortran;">use some_fast_intel_module, only: exp_fast => exp</PRE>
<P>Then I could apply the optimized algorithm where i specify exp_fast and obtain full precision when I specify the standard exp.</P>
<P>If I make a small module like this</P>
<PRE class="brush:fortran;">module math_fast ! In a separate file compiled with /Qfast-transcendentals
contains
real, elemental function exp_fast(x)
real, intent(in) :: x
exp_fast = exp(x)
end function exp_fast
end module math_fast
</PRE>
<PRE class="brush:;"> </PRE>
<P>If I inline this function into the other module which is not compiled with /Qfast-transcendentals will I obtain the fast trascendental algorithm when I apply exp_fast(x)?</P>
<P>Thanks for your help!</P>
<P>Jens B. Helmers</P>Sat, 08 Oct 2016 10:26:22 GMTJens_Bloch_H_2016-10-08T10:26:22Z/Qfast-transcendentals
https://community.intel.com/t5/Intel-Fortran-Compiler/Qfast-transcendentals/m-p/1106682#M128200
<P>Hi,</P>
<P>I have a module where I need to evaluate a lot of exp functions inside a big loop. Inside this loop I don't need full precision and the /Qfast-transcendentals compiler option is tempting to apply. However other places in the module I need full precision. Is there a way to specify exactly where to use the fast algorithm?</P>
<P><SPAN style="font-size: 1em;">Is it possible to apply the fast versions by a proper use statement as a replacement for the compiler option?</SPAN></P>
<PRE class="brush:fortran;">use some_fast_intel_module, only: exp_fast => exp</PRE>
<P>Then I could apply the optimized algorithm where i specify exp_fast and obtain full precision when I specify the standard exp.</P>
<P>If I make a small module like this</P>
<PRE class="brush:fortran;">module math_fast ! In a separate file compiled with /Qfast-transcendentals
contains
real, elemental function exp_fast(x)
real, intent(in) :: x
exp_fast = exp(x)
end function exp_fast
end module math_fast
</PRE>
<PRE class="brush:;"> </PRE>
<P>If I inline this function into the other module which is not compiled with /Qfast-transcendentals will I obtain the fast trascendental algorithm when I apply exp_fast(x)?</P>
<P>Thanks for your help!</P>
<P>Jens B. Helmers</P>Sat, 08 Oct 2016 10:26:22 GMThttps://community.intel.com/t5/Intel-Fortran-Compiler/Qfast-transcendentals/m-p/1106682#M128200Jens_Bloch_H_2016-10-08T10:26:22ZAs the main point of fast
https://community.intel.com/t5/Intel-Fortran-Compiler/Qfast-transcendentals/m-p/1106683#M128201
<P>As the main point of fast-transcendentals is the use of svml function calls, you may be able to control them with !dir$ [no]vector directives. These fast calls would occur only in vectorized loops.</P>
<P>Although the docs have said the default fast exp is permitted to deviate by up to 4 ULPs, such large deviations seem to apply only for large magnitude values. You would still expect better than 5 digits accuracy for default real in the border cases, and mostly 6.</P>
<P>I suppose you could try compiling the procedure with exp call only with fast-transcendentals while using Qipo.</P>Sat, 08 Oct 2016 11:56:33 GMThttps://community.intel.com/t5/Intel-Fortran-Compiler/Qfast-transcendentals/m-p/1106683#M128201TimP2016-10-08T11:56:33Z