I'm encountering a strange issue with the basic unix "bc" command on a mac and I want to just make sure I'm understanding it correctly. From the man pages, it says it respects order of operations, which I remember from my schooldays as "My Dear Aunt Sally" (multiply, divide, add, subtract)
When evaluating the following string in bc I'm getting an unexpected value
5/2+4+6-8*4+5*7+8
23
However, if I go through and I parenthesize the order of operations I stated earlier, I get a different result:
(((5/2)+(4+6))-((8*4)+((5*7)+8)))
-63
Do I have a fundamental misunderstanding of the bc command, or math?