title: Can I compute pow(10,x) at compile-time in c?
body: <p>Is it possible to compute pow(10,x) at compile time?  </p>
  
  <p>I've got a processor without floating point support and slow integer division.  I'm trying to perform as many calculations as possible at compile time.  I can dramatically speed up one particular function if I pass both <code>x</code> and <code>C/pow(10,x)</code> as arguments  (x and C are always constant integers, but they are different constants for each call).  I'm wondering if I can make these function calls less error prone by introducing a macro which does the <code>1/pow(10,x)</code> automatically, instead of forcing the programmer to calculate it?  </p>
  
  <p>Is there a pre-processor trick? Can I force the compiler optimize out the library call?</p>