PDA

查看完整版本 : Matalb中幂函数的快速逼近/实现


poster
2019-12-02, 14:40
<p>我可以在以下问题中找到C / C ++的类似答案:C / C ++中<a href="https://stackoverflow.com/questions/2347138/fast-implementation-approximation-of-pow-function-in-c-c">pow()函数的快速实现/近似</a> </p><p>根据探查器,我的代码的瓶颈类似于以下代码: </p><pre> <code>a=rand(100,1); % a is an array of doubles b=1.2; % power can be double instead of only integers. temp=power(a,b); % this line is taking maximum time</code> </pre><p>对于我的要求,只有前3-4位有效,因此对功率的任何快速近似对我来说都是非常有用的。任何建议也可以这样做。 </p>



更多&回答... (https://stackoverflow.com/q/59133789)