3 ms·
Other than advanced, graphing calculators that take full blown formulas as input, ordinary pocket calculators are not infix. They are prefix operations that ta
by kazinator 2y ago
Other than advanced, graphing calculators that take full blown formulas as input, ordinary pocket calculators are not infix.
They are prefix operations that take an implicit accumulator as an argument, resulting in something that superficially mimics a purely left-associative form of infix, with all operators having the same precedence.
For instance when we punch in 2 + 3 x 4 / 10 x 3 = = =, it means:
2 # prepare operand 2 in display
+ # move 2 into accumulator, prepare for addition
3 # prepare operand 3 in display
x # complete addition of acc 2 and operand 3, move 5 into acc and display
4 # prepare operand 4 in display
/ # complete multiplication of acc 5 and operand 4, move 20 into acc and dispay
10 # prepare operand 10 in display
x # complete division, moving 2 into acc and display
3 # prepare operand 3 in display
= # complete multiplication of acc 2 and 3, moving 6 into acc and display
= # complete multiplication of acc 6 and 3, moving 18 into acc and display
= # complete multiplication of acc 18 and 3, moving 54 into acc and display
It's really
$ echo 2 | plus 3 | times 4 | divide 10 | ...
I remember doing math drills like this in elementary school. The teacher startws with a number and then calls out operations:
"Start with 3; add 4; mutiply by 2; divide by 7; ....; ... write down the result."
I'm deeply skeptical that someone who had been through these drills would have trouble with a dollar store calculator.
- dlcarrier 2y agoYeah, that's why I stick with RPN calculators.
- kazinator 2y agoWorking RPN requires a substantial increment in intellectual capacity compared to applying a sequence of elementary operations to an accumulator. An operand consumed by a given RPN operation can be quite distant from it in the syntax, such that it's not obvious which one. A valid RPN expression could consist of an initial sequence of N operands, where N is limited only by stack depth, followed by a sequence of N-1 operators to decimate the operands.
- Aaron2222 2y agoBasically any scientific calculator will do proper infix with correct operator precedence, no need for a graphing one (or even one that displays the entered formula, the original Casio fx-82 for example only shows the number currently being entered, yet still does proper infix with correct operator precedence).