3 ms·
% has always been remainder operator and mistakenly referred to as the 'mod' operator: "The expression x % y produces the remainder when x is divided by y" K&R
by valbaca 5y ago
% has always been remainder operator and mistakenly referred to as the 'mod' operator:
"The expression x % y produces the remainder when x is divided by y" K&R C p37
- saila 5y agoModulo, in this context, is defined as the remainder when dividing two numbers, and mod is just short for modulo. Is your objection that the term modulo didn't originally have this meaning? That aside, perhaps the % operator should be pronounced "rem(ainder)" too avoid unnecessary jargon.