In a textbook I am asked to calculate an expression using a calculator: $$\frac{1}{2}\ln\left(e^{22}\right)$$
I tried using:
0.5*log(exp**22)
This returned an error:
File "/base/data/home/apps/s~sympy-live-hrd/56.412575950366508090/sympy/sympy/core/decorators.py", line 91, in __sympifyit_wrapper return func(a, b) File "/base/data/home/apps/s~sympy-live-hrd/56.412575950366508090/sympy/sympy/core/decorators.py", line 132, in binary_op_wrapper return func(self, other) File "/base/data/home/apps/s~sympy-live-hrd/56.412575950366508090/sympy/sympy/core/expr.py", line 172, in __rpow__ return Pow(other, self) File "/base/data/home/apps/s~sympy-live-hrd/56.412575950366508090/sympy/sympy/core/cache.py", line 95, in wrapper retval = func(*args, **kwargs) File "/base/data/home/apps/s~sympy-live-hrd/56.412575950366508090/sympy/sympy/core/power.py", line 286, in __new__ obj = b._eval_power(e) TypeError: unbound method _eval_power() must be called with exp instance as first argument (got Integer instance instead)
I tried replacing $\exp$ with just $e$ and received a similar error.
From my solutions page I can see that the answer is $11$. How can I type the expression in order to get $11$ back?
You should use exp as function:
0.5*log(exp(22))