1
$\begingroup$

Hi I need to implement a function $a+b\cdot 2^x$ in a highly resource constrained device. a and b are constants and x is a variable. How do I go about finding a simplified version of this expression so that I can get a value almost equal to it, without having to do multiplication, division or exponentiation? the result does not have to be exact, and I can find the new values for a and b empirically. Please help. Thank you

PS: please suggest some new tags for this question, I cannot think of any that are available currently

  • 1
    I'm not really sure what context you're doing this in, but you can try to round $x$ up or down to the nearest integer in which case the exponentiation becomes a bit-shift. Don't know if this helps you.2012-11-22
  • 0
    I was thinking more along the lines pf using logarithms or something, to reduce the exponentiation and multiplication2012-11-22
  • 0
    @user13267: it seems strange to be willing to take logs but not be willing to multiply. They are usually *much* slower.2013-06-25
  • 0
    when I was working on this it was for a DSP IC which has a fast logarithm operation. It's not as fast as multiplication, but if I converted all my operations in to logarithms including this one, I was hoping to simplify other parts of the overall program2013-06-26

1 Answers 1