This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Exponential Function on ARM7

Note: This was originally posted on 16th October 2008 at http://forums.arm.com

Hello

I am doing a project of Artificial Neural Network Implementation on ARM core. I wanted to know if exponential operations are possible on ARM7 or ARM9 and if yes, then how to do it

Thanks
  • Note: This was originally posted on 16th October 2008 at http://forums.arm.com

    > Possible
    Yes.

    > How
    By doing lots of multiplies - basically converting the exponential into long hand maths.
  • Note: This was originally posted on 17th October 2008 at http://forums.arm.com

    If I recall correctly, for a neural network application, your input values to the exponential function are going to be in a well-defined range. It may be sufficient to use a simple lookup table. If this is not accurate enough, a cheap way to get better is to use linear interpolation.

    If the input range is too large, then you can split the table into two, one for the integer part of the input, and one for the fractional part. Look up the two values, interpolate the fractional part if necessary, and multiply.

    E.g. exp(3.30103) = exp(3) * exp(0.30103)

    In base 10, you would need to set up a table of the integer exponents (1, 10, 100, 1000, etc.) and a table of the fractional exponents (indexed by, e.g. fractional value * 100). So we would look up int_exp[3] = 1000, and frac_exp[0.30103 * 100] = approximately 2.0, and multiply them = approximately 2000.