Re: [eigen] Statistics module

[ Thread Index | Date Index | More Archives ]

2009/5/11 Benoit Jacob <jacob.benoit.1@xxxxxxxxx>:
> Thinking more about it.
> It seems that in logsumexp() you rely on the rule
> log(ab)=log(a)+log(b),
> right?
> This is only true for the usual log of positive real numbers.
> All determinations of the log on all open subsets of complex numbers,
> fail to have this property.

I don't rely on that rule, but whoever uses this function would have
to make sure that the arguments of their complex number are in the
interval [-pi,pi], as always when using complex exponentials and
logarithms. No idea what use it would have to take the logsumexp of a
complex vector, though, as I only needed this function for
log-probabilities, which are always real. I included the complex case
only for completeness, but because the complex exponential is
exp(a+ib) = exp(a) exp(ib), it's enough to look for the maximum of the
real parts only.


Mail converted by MHonArc 2.6.19+