How can I type this into a calculator?
up vote
0
down vote
favorite
In a textbook I am asked to calculate an expression using a calculator: $$frac{1}{2}lnleft(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?
python
add a comment |
up vote
0
down vote
favorite
In a textbook I am asked to calculate an expression using a calculator: $$frac{1}{2}lnleft(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?
python
I believe it's $.5*log(exp(1)**22)$, but anyway you should ask these questions on a stack exchange more relevant to python errors.
– TrostAft
Nov 15 at 23:05
Theexp
function is a function, not the number $e$.
– Sean Roberson
Nov 15 at 23:05
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
In a textbook I am asked to calculate an expression using a calculator: $$frac{1}{2}lnleft(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?
python
In a textbook I am asked to calculate an expression using a calculator: $$frac{1}{2}lnleft(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?
python
python
edited Nov 20 at 19:27
Robert Howard
1,8481722
1,8481722
asked Nov 15 at 23:02
Doug Fir
1696
1696
I believe it's $.5*log(exp(1)**22)$, but anyway you should ask these questions on a stack exchange more relevant to python errors.
– TrostAft
Nov 15 at 23:05
Theexp
function is a function, not the number $e$.
– Sean Roberson
Nov 15 at 23:05
add a comment |
I believe it's $.5*log(exp(1)**22)$, but anyway you should ask these questions on a stack exchange more relevant to python errors.
– TrostAft
Nov 15 at 23:05
Theexp
function is a function, not the number $e$.
– Sean Roberson
Nov 15 at 23:05
I believe it's $.5*log(exp(1)**22)$, but anyway you should ask these questions on a stack exchange more relevant to python errors.
– TrostAft
Nov 15 at 23:05
I believe it's $.5*log(exp(1)**22)$, but anyway you should ask these questions on a stack exchange more relevant to python errors.
– TrostAft
Nov 15 at 23:05
The
exp
function is a function, not the number $e$.– Sean Roberson
Nov 15 at 23:05
The
exp
function is a function, not the number $e$.– Sean Roberson
Nov 15 at 23:05
add a comment |
2 Answers
2
active
oldest
votes
up vote
4
down vote
accepted
You should use exp as function: 0.5*log(exp(22))
Ah, thank you so much. Accepting this once the time limit comes off
– Doug Fir
Nov 15 at 23:07
1
+1. As a Python user, I can confirm that's the syntax.
– J.G.
Nov 15 at 23:08
add a comment |
up vote
3
down vote
You don't even need a calculator.
Note that $ln(e) = 1$ as $e^1 = e$. Recall also that $log_b (x^n) = n log_b (x).$ Thus $frac{1}{2} ln(e^{22}) = 11.$
My first reaction as well—but note that this does NOT answer OP’s question in the slightest.
– MPW
Nov 15 at 23:10
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
4
down vote
accepted
You should use exp as function: 0.5*log(exp(22))
Ah, thank you so much. Accepting this once the time limit comes off
– Doug Fir
Nov 15 at 23:07
1
+1. As a Python user, I can confirm that's the syntax.
– J.G.
Nov 15 at 23:08
add a comment |
up vote
4
down vote
accepted
You should use exp as function: 0.5*log(exp(22))
Ah, thank you so much. Accepting this once the time limit comes off
– Doug Fir
Nov 15 at 23:07
1
+1. As a Python user, I can confirm that's the syntax.
– J.G.
Nov 15 at 23:08
add a comment |
up vote
4
down vote
accepted
up vote
4
down vote
accepted
You should use exp as function: 0.5*log(exp(22))
You should use exp as function: 0.5*log(exp(22))
edited Nov 15 at 23:07
J.G.
19.6k21932
19.6k21932
answered Nov 15 at 23:05
gammatester
16.5k21631
16.5k21631
Ah, thank you so much. Accepting this once the time limit comes off
– Doug Fir
Nov 15 at 23:07
1
+1. As a Python user, I can confirm that's the syntax.
– J.G.
Nov 15 at 23:08
add a comment |
Ah, thank you so much. Accepting this once the time limit comes off
– Doug Fir
Nov 15 at 23:07
1
+1. As a Python user, I can confirm that's the syntax.
– J.G.
Nov 15 at 23:08
Ah, thank you so much. Accepting this once the time limit comes off
– Doug Fir
Nov 15 at 23:07
Ah, thank you so much. Accepting this once the time limit comes off
– Doug Fir
Nov 15 at 23:07
1
1
+1. As a Python user, I can confirm that's the syntax.
– J.G.
Nov 15 at 23:08
+1. As a Python user, I can confirm that's the syntax.
– J.G.
Nov 15 at 23:08
add a comment |
up vote
3
down vote
You don't even need a calculator.
Note that $ln(e) = 1$ as $e^1 = e$. Recall also that $log_b (x^n) = n log_b (x).$ Thus $frac{1}{2} ln(e^{22}) = 11.$
My first reaction as well—but note that this does NOT answer OP’s question in the slightest.
– MPW
Nov 15 at 23:10
add a comment |
up vote
3
down vote
You don't even need a calculator.
Note that $ln(e) = 1$ as $e^1 = e$. Recall also that $log_b (x^n) = n log_b (x).$ Thus $frac{1}{2} ln(e^{22}) = 11.$
My first reaction as well—but note that this does NOT answer OP’s question in the slightest.
– MPW
Nov 15 at 23:10
add a comment |
up vote
3
down vote
up vote
3
down vote
You don't even need a calculator.
Note that $ln(e) = 1$ as $e^1 = e$. Recall also that $log_b (x^n) = n log_b (x).$ Thus $frac{1}{2} ln(e^{22}) = 11.$
You don't even need a calculator.
Note that $ln(e) = 1$ as $e^1 = e$. Recall also that $log_b (x^n) = n log_b (x).$ Thus $frac{1}{2} ln(e^{22}) = 11.$
answered Nov 15 at 23:08
Sean Roberson
6,33131327
6,33131327
My first reaction as well—but note that this does NOT answer OP’s question in the slightest.
– MPW
Nov 15 at 23:10
add a comment |
My first reaction as well—but note that this does NOT answer OP’s question in the slightest.
– MPW
Nov 15 at 23:10
My first reaction as well—but note that this does NOT answer OP’s question in the slightest.
– MPW
Nov 15 at 23:10
My first reaction as well—but note that this does NOT answer OP’s question in the slightest.
– MPW
Nov 15 at 23:10
add a comment |
Thanks for contributing an answer to Mathematics Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3000453%2fhow-can-i-type-this-into-a-calculator%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I believe it's $.5*log(exp(1)**22)$, but anyway you should ask these questions on a stack exchange more relevant to python errors.
– TrostAft
Nov 15 at 23:05
The
exp
function is a function, not the number $e$.– Sean Roberson
Nov 15 at 23:05