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
-
1Can you be more clear? you want to calculate the integral? the steps? the value? ???Alberto Bonsanto– Alberto Bonsanto2012-11-27 01:04:08 +00:00Commented Nov 27, 2012 at 1:04
-
1A sample representative problem you'd like to solve would be helpful as well.jedwards– jedwards2012-11-27 01:10:13 +00:00Commented 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,user13267– user132672012-11-27 02:28:31 +00:00Commented Nov 27, 2012 at 2:28
-
I want to test it out in Matlab or Cuser13267– user132672012-11-27 02:30:41 +00:00Commented 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.Colin T Bowers– Colin T Bowers2012-11-27 06:33:40 +00:00Commented Nov 27, 2012 at 6:33
|
Show 1 more comment
1 Answer
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.
1 Comment
user13267
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