title: Replacing an math.h exp call with a lookup table
body: <p>I was wondering if there's any point in modifying code to use a lookup table for <code>math.h</code> <code>exp</code>, or if it was done automatically by <code>clang++</code> when given the <code>-O3</code> flag. </p>
  
  <p>If it's not, is there a <code>#pragma</code> that does this?</p>
  
  <p><strong>clarification</strong></p>
  
  <p>I was talking about memoisation of function calls. That is, if the function is passed the same exact arguments (yeah floating point numbers can actually be the same, if they're derived from constants and integers).</p>
  
  <p><strong>Example</strong></p>
  
  <p>Say I was going to run <code>exp(-a*x)</code> where <code>a</code> is not a compile-time constant, but once it's set once, it won't be modified. Similarly <code>x</code> can be one of 10 possible values, all of which are set once, and not modified again. </p>