title: Efficient implementation of natural logarithm (ln) and exponentiation
body: <p>I'm looking for implementation of <code>log()</code> and <code>exp()</code> functions provided in C library <code>&lt;math.h&gt;</code>. I'm working with 8 bit microcontrollers (OKI 411 and 431). I need to calculate <a href="http://en.wikipedia.org/wiki/Mean_kinetic_temperature" rel="nofollow noreferrer">Mean Kinetic Temperature</a>. The requirement is that we should be able to calculate MKT as fast as possible and with as little code memory as possible. The compiler comes with <code>log()</code> and <code>exp()</code> functions in <code>&lt;math.h&gt;</code>. But calling either function and linking with the library causes the code size to increase by 5 Kilobytes, which will not fit in one of the micro we work with (OKI 411), because our code already consumed ~12K of available ~15K code memory.</p>
  <p>The implementation I'm looking for should not use any other C library functions (like pow(), sqrt() etc). This is because all library functions are packed in one library and even if one function is called, the linker will bring whole 5K library to code memory.</p>
  <p>EDIT</p>
  <p>The algorithm should be correct up to 3 decimal places.</p>