Author Topic: Why RPN?  (Read 2063 times)

0 Members and 1 Guest are viewing this topic.

Offline c4ooo

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 250
  • Rating: +9/-1
  • The impossible chemical compound.
    • View Profile
Re: Why RPN?
« Reply #15 on: February 26, 2018, 11:22:37 pm »
When in doubt add more parentheses to eliminate the ambiguity.
-German Kuznetsov
The impossible chemical compound.

Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3820
  • Rating: +80/-8
    • View Profile
Re: Why RPN?
« Reply #16 on: March 08, 2018, 05:05:58 pm »
##6/2(1+2) =\ 6/2(3) =\ 6/6 =\ 1##
##\frac{6}{2(1+2)} =\ \frac{6}{2(3)} =\ \frac{6}{6} =\ 1##

This is due to how their division works. It's a fraction, not the ÷ symbol. So its 6 over 2(1+2) not six divided by 2(1+2). The way that TI-OS does it there is wrong according to that.

##6÷2(1+2) =\ 6÷2(3) =\ 3(3) =\ 9##

If we aren't treating it as a fraction then it is correc according to standard order of operations.
TI calculators interpret this just like any other interpreter or compiler would, it's CASIO that is wrong here. It's the only way that makes sense without natural expression display. The only difference is that the * operator is implicit.

This is how Python 3 does it:
Code: [Select]
>>> 6/2*(1+2)
9.0

When in doubt add more parentheses to eliminate the ambiguity.
send it