This is intentional, even if unexpected, as shown in line 152 of the link (turn on line numbers in the settings menu). I agree that following PEMDAS would make more sense.
Edit: it's the equation below "Although if you want to find roots higher than 3..."