The first is correct

(23^)2^ = 82^ = 64

But 232^^ = 2(3^2)^ = 2 9^ = 512

Solved

Posted on 2005-05-09

how do you convert infix to postfix in case of exponents?

is 2^3^2 in postfix

23^2^

or

232^^

quite confused on this. thanks.

is 2^3^2 in postfix

23^2^

or

232^^

quite confused on this. thanks.

15 Comments

2^3^2 = 2^(3^2) = 2^9 = 512

Therefore the second is correct.

mlmcc

>> 2^3^2

ans =

64

My HP calculator does postfix

23^2^ = 64

The two exponent operators have equal precedence, so you work left to right.

The Windows calculator, which enforces order of operations (at least, entering 2+3*4 results in 14, not 20) says 64.

TI calculators (and most others) use standard algrbraic operations.

HP and a few others use reverse polish notation which does operations in a different order if ( ) are not used.

or

232^^

On an HP calculator the last line would not work.

You use

2 enter

3 ^

2^

and the result is 64.

In your last line you have two operators in a row, which procedure does not work.

In your first line your notation is difficult in that you do not know whether you are dealing with 2 and 3 or 23. You could develop a computer program which would take care of this particular problem but you would still hve a problem with longer first numbers.

Two operators in a row is not a problem. You do have to use enter twice to terminate digit entry.

2

Enter

3

Enter

2

y^x Returns 8

Y^x Returns 64

23^2^

There are tons of converters on the web eg. http://webplaza.pt.lu/dost

2^3^5 = (2^3)^5 = 32768

2 3 ^ 5 ^ = 32768 on my HP-15C where the exponential function is y^x

5 3 2 ^ ^ = 32768 on the HP-35 where the exponential function is x^y

> is 2^3^2 in postfix

> 23^2^

> or

> 232^^

It depends on whether you have defined your exponent operator as left-associative or right-associative. I don't think there's any authoritative answer on this. Without defining your exponent operator as left-associative or right associative, a^b^c results in an ambiguous expression.

Take a look at http://mathworld.wolfram.c

i found these websites and a book saying that exponents are evaluated right to left.

http://www.reed.edu/~mcpha

http://www.qiksearch.com/j

By clicking you are agreeing to Experts Exchange's Terms of Use.

Title | # Comments | Views | Activity |
---|---|---|---|

Linear independence | 9 | 27 | |

experiment for quantitative analysis | 6 | 61 | |

Sample Space | 12 | 35 | |

Probability Calculation | 2 | 33 |

how to add IIS SMTP to handle application/Scanner relays into office 365.

Join the community of 500,000 technology professionals and ask your questions.

Connect with top rated Experts

**15** Experts available now in Live!