what is r*t? If you did the math, you get a number. On the other side of the = sign, you get a number. They should be the same, right? Well. Yes. That is math.
This is programming. In programming = sign does not mean left side is equal to right side (== sign means this in a way. But it checks to see if the left side equals the right side and spits out a true or false). The = sign is an assignment operator. So whatever is on the right side of the = sign is stored into the variable on the left side.
So. With this logic, you are trying to store a number inside a number. This does not make sense to me, and it doesn't make sense to the compiler. r=(r*t)/t is ok. Because r is a variable. But, r*t is not a variable, so r*t= log(total/p) will give an error.