Nathaniel Knight

Reflections, diversions, and opinions from a progressive ex-physicist programmer dad with a sore back.

Minuend, Subtrahend, and Friends

I'm a big believer that good names for things are important and that creating good names is work. It's a rare good fortune when there are standard unambiguous names that I can use in my code.

One example is division:

div(denominator, numerator)

I would expect these arguments to be the other way around, so I can tell at a glance that I should double check this line and maybe add a comment explaining what's going on.

This prompts a question: are there similar names for the components of other operations? What are the parts of subtraction called? Are the names standardized?

Addition and multiplication are both commutative (you can shuffle the order of the arguments around and it doesn't change the answer), so there are fewer parts to name.

An addition is the sum of terms, addends, or summands.

Diagram illustrating the different parts of addition

A multiplication is the product of factors.

Diagram illustrating the different parts of multiplication

Subtraction and division are more interesting because they're not commutative; the different parts of the equation do need different names.

A subtraction is the difference of a minuend and a subtrahend.

Diagram illustrating the different parts of subtraction

A division is the quotient (and possibly a remainder) of a numerator and a denominator.

Diagram illustrating the different parts of subtraction

As you might expect, this list isn't even close to comprehensive; Wikipedia lists other names and operations!

Now, I'm not sure how useful are in practice (especially as I don't think they're in common use). I would guess that any time I might be tempted to use these names, a better, more specific name wouldn't be hard to find. However, if you're writing very generic operations on data types that are numbers (or act like numbers) and you need some names for the arguments that are standard and unambiguous I suppose these could be an option.