I have seen something similar in some other thread. You might find certain parts of that post helpful, not everything obviously, but I still think it is worth checking out. 
[url=http://smartitlabs.in/tez/2018/01/28/the-order-of-operations-pemdas-purplemath/]http://smartitlabs.in/tez/2018/01/28/the-order-of-operations-pemdas-purplemath/[/url]