+ 2

Where do floor division // and modulo % operators fit in with PEMDAS?

PEMDAS (Parenthesis, Exponentation, Moltiplication, Division, Addition, Subtraction) is the order in which mathematical expressions are to be evaluated. I'm not sure which is the right place for // and % in the above-mentioned list.

9th May 2017, 9:53 PM
Davide Corbelletto
Davide Corbelletto - avatar
3 Respuestas
+ 12
Think about what each does. For example, modulo is DIVIDING and taking the remainder. Thus, it has the same importance and order as multiplication and division. I think you can figure out the other one. 😎
9th May 2017, 10:24 PM
J.G.
J.G. - avatar
+ 11
very helpful
10th May 2017, 12:41 PM
‎‏‎‏‎Joe
‎‏‎‏‎Joe - avatar
+ 3
Floor division (//)and modulo (%) are nowhere in practical mathematics where PEMDAS rule is applied. It is (// and %) only present in coding. That's why they are not present in the rule.
9th May 2017, 11:13 PM
Rishabh Agrawal
Rishabh Agrawal - avatar