1
$\begingroup$

I implemented log probabilities in Java to do some calculations with better accuracy (less compounding rounding errors). I managed to get addition and multiplication working, but I also need to do subtraction and division. Is this possible?

$\endgroup$
3
  • $\begingroup$ Could you be more explicit, by taking examples... $\endgroup$ – Jean Marie Aug 2 '16 at 22:02
  • $\begingroup$ Let's say I have probabilities 0.8 and 0.2. I want to calculate 0.8 - 0.2 by using their log probabilities, which are -0.2231 and -1.6094 when using e as the base. How could I do this? $\endgroup$ – Atte Juvonen Aug 2 '16 at 22:14
  • $\begingroup$ why do you want to do this?? you could do this with exp function. $e^{0.8-0.2}=e^{0.8}/e^{0.2}$ $\endgroup$ – MR_BD Aug 3 '16 at 10:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.