12-13-2023, 02:11 AM
The BIMDAS rules (universal priority rules for math) sets priority for math operations as
Brackets, Indices, Multiplication, Division, Addition, Subtraction.
Within the BIMDAS rules, the expression 5+4*3^2-1/2 becomes (3^2)*4/2+5-1
B I M D A S
and the result is 22.
With the re-arrangement, Phoenix returns 22, as expected.
but when entered as 5 + 4 * 3 ^ 2 - 1 / 2, it returns 40.5
Does this mean we must apply the BIMDAS rules manually, or am I missing something?
Print "Am I missing something here?"
Brackets, Indices, Multiplication, Division, Addition, Subtraction.
Within the BIMDAS rules, the expression 5+4*3^2-1/2 becomes (3^2)*4/2+5-1
B I M D A S
and the result is 22.
With the re-arrangement, Phoenix returns 22, as expected.
but when entered as 5 + 4 * 3 ^ 2 - 1 / 2, it returns 40.5
Does this mean we must apply the BIMDAS rules manually, or am I missing something?
Print "Am I missing something here?"
Of all the places on Earth, and all the planets in the Universe, I'd rather live here (Perth, W.A.)
Please visit my Website at: http://oldendayskids.blogspot.com/
Please visit my Website at: http://oldendayskids.blogspot.com/