I am trying to calculate the following
$K^{-1}DK^{-1} * p$
Where $K$ is symmetric positive definite and $D$ is positive diagonal and $p$ is a vector. The problem is that p is very, very small so its rounded to zero by Matlab so I want to take the log of of the calculations of $p$ so that I can actually calculate the map above. However if I take the log I need to transform it back somehow.
Can this be done? $K^{-1}$ will naturally contain negative entries.