Wrong order of operations after a ROOT operator.
Problem: A cube with side length 5 has volume V. What is the side length of a cube that has volume 2V ?
So if we do the calculations one by one we get the correct answer:
5³
= 125
125 × 2
= 250
₃√250
= 6,299605249
<------ Correct Answer
But if we enter the same thing as a single equation we get:
₃√2×5³
= 157,490131237
<------ Wrong answer!
Same thing again but with parenthesis:
₃√(2×5³)
= 6,299605249
<------ Correct Answer
Ideally the program should understand what the user meant without entering a parenthesis.
Maybe after entering the √
operator we should print a VINICULUM over the following characters until a space
character is entered.
Failing that, it should at least put the parenthesis automatically to let the user know that they are required.