My first guess (and it is a quick guess) is that the issue is how pi is getting interpreted. The two interpretations I see are:
- the constant pi
- the function pi(x) which returns the number of primes less than or equal to x
If you want the constant, I suggest always explicitly including the * between pi and ( so that you are guaranteed to get multiplication of the constant.