1

What would be the best way of calculating or approximating the exponential integral function for implementing in a highly resource constrained device? I would like to try out the approximating function in C or Matlab first if possible

6
  • 1
    Can you be more clear? you want to calculate the integral? the steps? the value? ??? Commented Nov 27, 2012 at 1:04
  • 1
    A sample representative problem you'd like to solve would be helpful as well. Commented Nov 27, 2012 at 1:10
  • A sample problem is that I will get some number as the result of a calculation, then I will need to do expint(number) and get this value to be multiplied with some other parameter. expint() function is already available in matlab and I know the overall algorithm works if I use the expint() function of matlab. But the goal is to implement this algorithm in a dsp chip using assembly language so I need a way to calculate or at least approximate the exponential integral function. So if there is another expression that gives an approximate value of expint() for some range of numbers, Commented Nov 27, 2012 at 2:28
  • I want to test it out in Matlab or C Commented Nov 27, 2012 at 2:30
  • 2
    @user13267 THE resource for questions of this kind is Abramowitz and Stegun (1972) "The Handbook of Mathematical Functions". It is free online in pdf form and is arguably the most useful reference in existence for mathematicians. In your case there is a whole chapter on various forms and series expansions for the exponential integral. Truncating one of these expansions is probably your best bet. I'm short of time at the moment, so won't be able to recommend one. Sorry. Commented Nov 27, 2012 at 6:33

1 Answer 1

0

There is a C function for calculating the exponential integral function here http://www.mymathlib.com/functions/exponential_integrals.html.

I'm not sure if it meets your resource constraints, but the source has no dependencies other than math.h and float.h, which you hopefully have available on your device.

Sign up to request clarification or add additional context in comments.

1 Comment

thanks for the link but this function is too complicated for my constraints; I need a simpler approximation which does not have to be exact

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.