modulo
/ˈmɒdjʊləʊ/
preposition
- (mathematics) Given a specified modulus of.
- : (colloquial) Except for differences accounted for by.
- : (extended use) With due allowance for (a specified exception or particular detail).
The mathematical definition is the source of this more idiomatic usage. The modulo operation partitions integers into equivalence classes, e.g. 5 modulo 4 = 1 means "in the world of modulo 4, 1 is the same as 5".
In the example, different software systems are deemed in the same equivalence class; the need to recompile the source is deemed irrelevant. You could replace modulo with "with the exception of" or "ignoring the need for" in the example to get a similar meaning sentence.
Answer from Jonathan Millman on Stack ExchangeThe mathematical definition is the source of this more idiomatic usage. The modulo operation partitions integers into equivalence classes, e.g. 5 modulo 4 = 1 means "in the world of modulo 4, 1 is the same as 5".
In the example, different software systems are deemed in the same equivalence class; the need to recompile the source is deemed irrelevant. You could replace modulo with "with the exception of" or "ignoring the need for" in the example to get a similar meaning sentence.
It's quite common for engineers to use the term mod (or modulo) to mean "not counting" (or "except for"). It means something that is small enough to not change the main answer, it's just a detail.
Videos
The pattern
X modulo Y
is an informal but common parlance in technical, especially mathematically, oriented talk. It is used to mean informally 'X, ignoring Y'. For example,
"The rocket design was flawless, modulo the toxic waste produced by its fuel."
The meaning is inspired by, but not perfectly corresponding to, the arithmetic modulo function (for example, clock-time addition) which when suitably abstracted involves 'collapsing' all items of a set into the special items of the set, so that the full set does not need to be dealt with (this is where the associated meaning of 'ignoring' comes from).
In your interpretation "note what parts of it still need to be modified", the 'modified' part is irrelevant. 'Modulo' is pragmatically "I'm telling you about the most important part (the X), but remarking on the existence of some part that might be important for other reasons but under the current context we want to ignore (the Y)".
I only see this usage from academics with a background that includes England. It is used to mean the opposite of except - some part of the set is included, not excluded, and you're saying that you're including it even though some people might not. It isn't a substitute for but or except, because those would be about excluding something from the set. It might be closer to even though.
In math, modulo is the remainder after dividing, so 5 mod 2 is 1. In words, it's something like even after accounting for. However, it has been heard by generations of people who aren't sure what it means, don't want to ask, and feel that smart people use it. Those people tend to use it as except or but, meaning that you probably can't be entirely sure any more what someone means when they use it.
Mathematics would say: "10 is congruent to 1 modulo 3". The modified usage "10 modulo 3" with "modulo" as an operation (like "10 plus 3") is from computer programming.
The verb in your sentence is equals. The entire sentence can be parsed either as 10 modulo 3 being a noun phrase with modulo 3 operating as an adjective, or as modulo 3 equals being a verb phrase with modulo 3 operating as an adverb. Whichever analysis is preferred, the usage is perfectly standard, if slightly imprecise. The reference you cite is correct to prefer is congruent to over equals.
No, "modulo" is not a verb. It's the Latin ablative of modulus which itself means "a small measure."
It is technically mathematical jargon:
commonly used phrases which are part of the culture of mathematics, rather than of the subject
I recommend you rewrite that documentation sentence as simply:
Theta is the angle in radians from the X-axis.
If you feel like you need to conjugate "modulo", your sentence is probably already obtuse (haha). But you could elaborate each on a case by case basis:
Note: Theta is converted to the smallest non-negative coterminal angle.
The verb is to reduce a number to a range (or modulo another number).
The most common use I've found is for "wrapping round" your array indices.
For example, if you just want to cycle through an array repeatedly, you could use:
int a[10];
for (int i = 0; true; i = (i + 1) % 10)
{
// ... use a[i] ...
}
The modulo ensures that i stays in the [0, 10) range.
I usually use them in tight loops, when I have to do something every X loops as opposed to on every iteration..
Example:
int i;
for (i = 1; i <= 1000000; i++)
{
do_something(i);
if (i % 1000 == 0)
printf("%d processed\n", i);
}