Re: [eigen] How to raise double to array powers in Eigen

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


On 18.08.2014 00:23, Ian Bell wrote:
cross-posted to stack overflow...

If you cross-post, could you post a link as well?

I need to raise a double value to an array of integer powers, in c++ this
would look something like

Could you be a bit more specific about the "array of integer powers" (I guess 'exponents')? If they are a sequence 0,1,2,3,... your proposed solution is definitely very inefficient. If they are of great range, with no apparent pattern, I would say the exp(log(delta)*exponent) approach is basically the most efficient solution (maybe using log2 and exp2 would be more efficient, if they were available).

Christoph


--
----------------------------------------------
Dipl.-Inf., Dipl.-Math. Christoph Hertzberg
Cartesium 0.049
Universität Bremen
Enrique-Schmidt-Straße 5
28359 Bremen

Tel: +49 (421) 218-64252
----------------------------------------------



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/