Well I also get 1
if it’s
9 - ( 3 / ( 1/3 ) ) + 1
but if you do it step by step without the priority of operations you’d get
nine, minus three, divided by one third, plus one
so… 19
?
It really sucks when you need to complete a “mathematical skill question” to get a prize or something and you can’t trust the guys submitting the problem to you know about priority of operations
And yeah, agree with others in the thread, whenever I’ve had to use it in code I never relied on the built in priority of operations, I just threw superfluous parentheses everywhere. Bonus points if the environment lets me add line breaks without it meaning something
9 - (
3 / (
1 / 3
)
) + 1
This looks silly now but when instead of 9
it’s stuff like get_user_karma_points($current_users[$current_index], 'weekly')
it helps