Personally, after some experience with programming, I've started to believe that BODMAS/PEMDAS is a bad convention.
I prefer a simple left to right convention for order of operations.
But I am completely with you here spectralhunter, I also don't know a thing about coding apart from 'Hello world', so I am not in a position to really tell.
Computers are really good at maths.

This is not a programming limitation. It's the way it's been programmed.
I'm not going to be able to say whether or not there's a mistake though.