Re: [eigen] log10 support? |
[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]
Hi,
log10(x) = constant * log(x), so why not just implement the log10
function as returning an _expression_ "product of constant times the
return type of log" ? Thanks to inlining, that will be just 1
multiplication slower than log() (i.e. only a tiny bit), and will
automatically benefit from log() vectorization!
Your approach is the right one in the general case, it's just that
here we are in a very special case.
Benoit
2010/6/7 Trevor Irons <trevorirons@xxxxxxxxx>:
> This patch adds log10 support to arrays.
>
> I'm still learning Eigen, I build it by grepping all the instances of Log,
> and log that I could find in the source code. It is possible that I missed
> something, but test cases compile and give correct answers. I don't know how
> to add to the unit tests.
>
> Any problems with pushing this?
>
> Thanks,
>
> Trevor
>
>
>
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |