I have found that in a dataset I am using I get different results depending on how I tell Matlab to compute the power. If I submit the command Xpow=abs(X).^2; vs. Xpow=X.*conj(X);, I get different results. The latter is much faster to compute, but most people in my field use the former.
My question is which is more likely to be closer to the true value and why?
This difference is small in the following example of X=rand(100, 100)+rand(100,100)*i; the error approximately 10^-15. But it's larger in my actual dataset, about 10^-9. Accuracy matters in my line of research so I would like to know which is closest to the true value.
variable*conj(variable)is real and optimize it (probably not(complicated_expression)*conj(complicated_expression), though, as far as I know). – Federico Poloni Apr 06 '20 at 17:43